├── main ├── component.mk ├── fonts.c ├── include │ ├── i2c.hpp │ ├── fonts.h │ └── ssd1306.hpp ├── i2c.cpp ├── main.cpp ├── ssd1306.cpp ├── font_tahoma_8pt.c └── font_glcd_5x7.c ├── Makefile ├── .gitattributes ├── .gitignore ├── README.md └── sdkconfig /main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := esp32-i2c-ssd1306-oled 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | COMPONENT_LDFLAGS += -lstdc++ 11 | -------------------------------------------------------------------------------- /main/fonts.c: -------------------------------------------------------------------------------- 1 | /* 2 | * oled_fonts.c 3 | * 4 | * Created on: Jan 3, 2015 5 | * Author: Baoshi 6 | */ 7 | //#include "esp_common.h" 8 | #include "fonts.h" 9 | 10 | extern const font_info_t glcd_5x7_font_info; 11 | extern const font_info_t tahoma_8pt_font_info; 12 | 13 | const font_info_t * fonts[NUM_FONTS] = 14 | { 15 | &glcd_5x7_font_info, 16 | &tahoma_8pt_font_info 17 | }; 18 | -------------------------------------------------------------------------------- /main/include/i2c.hpp: -------------------------------------------------------------------------------- 1 | #ifndef I2C_H_ 2 | #define I2C_H_ 3 | 4 | #include "driver/gpio.h" 5 | #include "rom/ets_sys.h" 6 | 7 | class I2C { 8 | private: 9 | gpio_num_t scl_pin, sda_pin; 10 | 11 | public: 12 | I2C(gpio_num_t scl, gpio_num_t sda); 13 | void init(uint8_t scl_pin, uint8_t sda_pin); 14 | bool start(void); 15 | void stop(void); 16 | bool write(uint8_t data); 17 | uint8_t read(void); 18 | void set_ack(bool ack); 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | 49 | #Eclipse 50 | .settings 51 | .project 52 | .cproject 53 | 54 | #ESP32 55 | build 56 | *.old 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #ESP32 I2C OLED SSD1306 library for esp-idf 2 | 3 | This is a library of i2c oled ssd1306 for [esp-idf](https://github.com/espressif/esp-idf). 4 | 5 | Code modified from [ESP-I2C-OLED](https://github.com/baoshi/ESP-I2C-OLED). 6 | 7 | I changed the code style into C++. So you can easily use multiple devices by create different objects. I also changed the hardware i2c driver into a software one. So you can use any two GPIO pins as SDA and SCL. 8 | 9 | **IMPORTANT:** If you want to compile it, be sure that you add **"COMPONENT_LDFLAGS += -lstdc++"** in Makefile. 10 | 11 | Pay attention that OLED class has two different constructors. One with default I2C address 0x78, but in the other you can set manual address. 12 | 13 | Remember to call **refresh** after you draw something new on the screen. 14 | 15 | External RESET pin function is not implemented yet. 16 | 17 | **NOTICE1:** If you want to use pure C method, please turn to branch [pure-c](https://github.com/imxieyi/esp32-i2c-ssd1306-oled/tree/pure-c) 18 | 19 | **NOTICE2:** I'm using C++ style string, if you don't want that, you can uncomment related code blocks in ssd1306.cpp and ssd1306.hpp. 20 | 21 | -------------------------------------------------------------------------------- /main/include/fonts.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file fonts.h 4 | * @author Baoshi 5 | * @version 0.8 6 | * @date Jan 3, 2014 7 | * @brief Font description for OLED display, based on 8 | * 9 | * "TheDotFactory" by Eran "Pavius" Duchan 10 | * 11 | ****************************************************************************** 12 | * @copyright 13 | * 14 | * Copyright (c) 2015, Baoshi Zhu. All rights reserved. 15 | * Use of this source code is governed by a BSD-style license that can be 16 | * found in the LICENSE.txt file. 17 | * 18 | * THIS SOFTWARE IS PROVIDED 'AS-IS', WITHOUT ANY EXPRESS OR IMPLIED 19 | * WARRANTY. IN NO EVENT WILL THE AUTHOR(S) BE HELD LIABLE FOR ANY DAMAGES 20 | * ARISING FROM THE USE OF THIS SOFTWARE. 21 | * 22 | */ 23 | 24 | #ifndef FONTS_H 25 | #define FONTS_H 26 | #include "stdint.h" 27 | 28 | //! @brief Character descriptor 29 | typedef struct _font_char_desc 30 | { 31 | uint8_t width; //!< Character width in pixel 32 | uint16_t offset; //!< Offset of this character in bitmap 33 | } font_char_desc_t; 34 | 35 | 36 | //! @brief Font information 37 | typedef struct _font_info 38 | { 39 | uint8_t height; //!< Character height in pixel, all characters have same height 40 | uint8_t c; //!< Simulation of "C" width in TrueType term, the space between adjacent characters 41 | char char_start; //!< First character 42 | char char_end; //!< Last character 43 | const font_char_desc_t* char_descriptors; //! descriptor for each character 44 | const uint8_t *bitmap; //!< Character bitmap 45 | } font_info_t; 46 | 47 | 48 | #define NUM_FONTS 2 //!< Number of built-in fonts 49 | 50 | extern const font_info_t * fonts[NUM_FONTS]; //!< Built-in fonts 51 | 52 | 53 | #endif /* FONTS */ 54 | -------------------------------------------------------------------------------- /main/i2c.cpp: -------------------------------------------------------------------------------- 1 | #include "include/i2c.hpp" 2 | 3 | #define _DELAY ets_delay_us(1) 4 | #define _SDA1 gpio_set_level(sda_pin,1) 5 | #define _SDA0 gpio_set_level(sda_pin,0) 6 | 7 | #define _SCL1 gpio_set_level(scl_pin,1) 8 | #define _SCL0 gpio_set_level(scl_pin,0) 9 | 10 | #define _SDAX gpio_get_level(sda_pin) 11 | #define _SCLX gpio_get_level(scl_pin) 12 | 13 | I2C::I2C(gpio_num_t scl, gpio_num_t sda) 14 | { 15 | scl_pin = scl; 16 | sda_pin = sda; 17 | 18 | gpio_set_pull_mode(scl_pin,GPIO_PULLUP_ONLY); 19 | gpio_set_pull_mode(sda_pin,GPIO_PULLUP_ONLY); 20 | 21 | gpio_set_direction(scl_pin,GPIO_MODE_INPUT_OUTPUT); 22 | gpio_set_direction(sda_pin,GPIO_MODE_INPUT_OUTPUT); 23 | 24 | // I2C bus idle state. 25 | gpio_set_level(scl_pin,1); 26 | gpio_set_level(sda_pin,1); 27 | } 28 | 29 | 30 | bool I2C::start(void) 31 | { 32 | _SDA1; 33 | _SCL1; 34 | _DELAY; 35 | if (_SDAX == 0) return false; // Bus busy 36 | _SDA0; 37 | _DELAY; 38 | _SCL0; 39 | return true; 40 | } 41 | 42 | 43 | 44 | void I2C::stop(void) 45 | { 46 | _SDA0; 47 | _SCL1; 48 | _DELAY; 49 | while (_SCLX == 0); // clock stretching 50 | _SDA1; 51 | _DELAY; 52 | } 53 | 54 | 55 | // return: true - ACK; false - NACK 56 | bool I2C::write(uint8_t data) 57 | { 58 | uint8_t ibit; 59 | bool ret; 60 | 61 | for (ibit = 0; ibit < 8; ++ibit) 62 | { 63 | if (data & 0x80) 64 | _SDA1; 65 | else 66 | _SDA0; 67 | _DELAY; 68 | _SCL1; 69 | _DELAY; 70 | data = data << 1; 71 | _SCL0; 72 | } 73 | _SDA1; 74 | _DELAY; 75 | _SCL1; 76 | _DELAY; 77 | ret = (_SDAX == 0); 78 | _SCL0; 79 | _DELAY; 80 | 81 | return ret; 82 | } 83 | 84 | 85 | uint8_t I2C::read(void) 86 | { 87 | uint8_t data = 0; 88 | uint8_t ibit = 8; 89 | 90 | _SDA1; 91 | while (ibit--) 92 | { 93 | data = data << 1; 94 | _SCL0; 95 | _DELAY; 96 | _SCL1; 97 | _DELAY; 98 | if (_SDAX) 99 | data = data | 0x01; 100 | } 101 | _SCL0; 102 | 103 | return data; 104 | } 105 | 106 | 107 | void I2C::set_ack(bool ack) 108 | { 109 | _SCL0; 110 | if (ack) 111 | _SDA0; // ACK 112 | else 113 | _SDA1; // NACK 114 | _DELAY; 115 | // Send clock 116 | _SCL1; 117 | _DELAY; 118 | _SCL0; 119 | _DELAY; 120 | // ACK end 121 | _SDA1; 122 | } 123 | 124 | -------------------------------------------------------------------------------- /main/main.cpp: -------------------------------------------------------------------------------- 1 | #include "esp_log.h" 2 | #include "fonts.h" 3 | #include "ssd1306.hpp" 4 | #include "driver/gpio.h" 5 | #include "driver/adc.h" 6 | #include "freertos/FreeRTOS.h" 7 | #include "freertos/task.h" 8 | #include 9 | #include 10 | #include 11 | #include 12 | using namespace std; 13 | 14 | OLED oled = OLED(GPIO_NUM_19, GPIO_NUM_22, SSD1306_128x64); 15 | 16 | void myTask(void *pvParameters) { 17 | adc1_config_width(ADC_WIDTH_12Bit); 18 | adc1_config_channel_atten(ADC1_CHANNEL_4, ADC_ATTEN_0db); 19 | 20 | ostringstream os; 21 | // char *data = (char*) malloc(32); 22 | uint16_t graph[128]; 23 | memset(graph, 0, sizeof(graph)); 24 | // for(uint8_t i=0;i<64;i++){ 25 | // oled.clear(); 26 | // oled.draw_hline(0, i, 100, WHITE); 27 | // sprintf(data,"%d",i); 28 | // oled.draw_string(105, 10, string(data), BLACK, WHITE); 29 | // oled.refresh(false); 30 | // vTaskDelay(1000 / portTICK_PERIOD_MS); 31 | // } 32 | while (1) { 33 | os.str(""); 34 | os << "ADC_CH4(GPIO32):" << adc1_get_voltage(ADC1_CHANNEL_4); 35 | for (int i = 0; i < 127; i++) { 36 | graph[i] = graph[i + 1]; 37 | } 38 | graph[127] = adc1_get_voltage(ADC1_CHANNEL_4); 39 | oled.clear(); 40 | // sprintf(data, "01"); 41 | // oled.select_font(2); 42 | // oled.draw_string(0, 0, string(data), WHITE, BLACK); 43 | // sprintf(data, ":%d", graph[127]); 44 | oled.select_font(1); 45 | oled.draw_string(0, 0, os.str(), WHITE, BLACK); 46 | // oled.draw_string(33, 4, string(data), WHITE, BLACK); 47 | graph[127] = graph[127] * 48 / 4096; 48 | for (uint8_t i = 0; i < 128; i++) { 49 | oled.draw_pixel(i, 63 - graph[i], WHITE); 50 | } 51 | oled.draw_pixel(127, 63 - graph[127], WHITE); 52 | oled.refresh(true); 53 | vTaskDelay(500 / portTICK_PERIOD_MS); 54 | } 55 | 56 | } 57 | 58 | #ifdef __cplusplus 59 | extern "C" { 60 | #endif 61 | void app_main() { 62 | 63 | oled = OLED(GPIO_NUM_19, GPIO_NUM_22, SSD1306_128x64); 64 | if (oled.init()) { 65 | ESP_LOGI("OLED", "oled inited"); 66 | // oled.draw_rectangle(10, 30, 20, 20, WHITE); 67 | // oled.select_font(0); 68 | // //deprecated conversion from string constant to 'char*' 69 | // oled.draw_string(0, 0, "glcd_5x7_font_info", WHITE, BLACK); 70 | // ESP_LOGI("OLED", "String length:%d", 71 | // oled.measure_string("glcd_5x7_font_info")); 72 | // oled.select_font(1); 73 | // oled.draw_string(0, 18, "tahoma_8pt_font_info", WHITE, BLACK); 74 | // ESP_LOGI("OLED", "String length:%d", 75 | // oled.measure_string("tahoma_8pt_font_info")); 76 | // oled.draw_string(55, 30, "Hello ESP32!", WHITE, BLACK); 77 | // oled.refresh(true); 78 | // vTaskDelay(3000 / portTICK_PERIOD_MS); 79 | xTaskCreatePinnedToCore(&myTask, "adctask", 2048, NULL, 5, NULL, 1); 80 | } else { 81 | ESP_LOGE("OLED", "oled init failed"); 82 | } 83 | } 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | -------------------------------------------------------------------------------- /sdkconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # Espressif IoT Development Framework Configuration 4 | # 5 | 6 | # 7 | # SDK tool configuration 8 | # 9 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 10 | CONFIG_PYTHON="python" 11 | 12 | # 13 | # Bootloader config 14 | # 15 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set 16 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set 17 | CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y 18 | # CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set 19 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set 20 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set 21 | CONFIG_LOG_BOOTLOADER_LEVEL=2 22 | 23 | # 24 | # Security features 25 | # 26 | # CONFIG_SECURE_BOOT_ENABLED is not set 27 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set 28 | 29 | # 30 | # Serial flasher config 31 | # 32 | CONFIG_ESPTOOLPY_PORT="COM7" 33 | # CONFIG_ESPTOOLPY_BAUD_115200B is not set 34 | # CONFIG_ESPTOOLPY_BAUD_230400B is not set 35 | CONFIG_ESPTOOLPY_BAUD_921600B=y 36 | # CONFIG_ESPTOOLPY_BAUD_2MB is not set 37 | # CONFIG_ESPTOOLPY_BAUD_OTHER is not set 38 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 39 | CONFIG_ESPTOOLPY_BAUD=921600 40 | CONFIG_ESPTOOLPY_COMPRESSED=y 41 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set 42 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set 43 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y 44 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set 45 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 46 | # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set 47 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 48 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set 49 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set 50 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 51 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set 52 | # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set 53 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y 54 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set 55 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set 56 | CONFIG_ESPTOOLPY_FLASHSIZE="4MB" 57 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 58 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 59 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set 60 | # CONFIG_ESPTOOLPY_BEFORE_ESP32R0 is not set 61 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 62 | # CONFIG_ESPTOOLPY_AFTER_RESET is not set 63 | CONFIG_ESPTOOLPY_AFTER_NORESET=y 64 | CONFIG_ESPTOOLPY_AFTER="no_reset" 65 | # CONFIG_MONITOR_BAUD_9600B is not set 66 | # CONFIG_MONITOR_BAUD_57600B is not set 67 | CONFIG_MONITOR_BAUD_115200B=y 68 | # CONFIG_MONITOR_BAUD_230400B is not set 69 | # CONFIG_MONITOR_BAUD_921600B is not set 70 | # CONFIG_MONITOR_BAUD_2MB is not set 71 | # CONFIG_MONITOR_BAUD_OTHER is not set 72 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 73 | CONFIG_MONITOR_BAUD=115200 74 | 75 | # 76 | # Partition Table 77 | # 78 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 79 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set 80 | # CONFIG_PARTITION_TABLE_CUSTOM is not set 81 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 82 | CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000 83 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 84 | CONFIG_APP_OFFSET=0x10000 85 | CONFIG_PHY_DATA_OFFSET=0xf000 86 | CONFIG_OPTIMIZATION_LEVEL_DEBUG=y 87 | # CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set 88 | 89 | # 90 | # Component config 91 | # 92 | # CONFIG_BT_ENABLED is not set 93 | CONFIG_BT_RESERVE_DRAM=0 94 | 95 | # 96 | # ESP32-specific 97 | # 98 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set 99 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set 100 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 101 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 102 | CONFIG_MEMMAP_SMP=y 103 | # CONFIG_MEMMAP_TRACEMEM is not set 104 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 105 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set 106 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set 107 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y 108 | # CONFIG_ESP32_ENABLE_COREDUMP is not set 109 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 110 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048 111 | CONFIG_MAIN_TASK_STACK_SIZE=4096 112 | CONFIG_NEWLIB_STDOUT_ADDCR=y 113 | # CONFIG_NEWLIB_NANO_FORMAT is not set 114 | CONFIG_CONSOLE_UART_DEFAULT=y 115 | # CONFIG_CONSOLE_UART_CUSTOM is not set 116 | # CONFIG_CONSOLE_UART_NONE is not set 117 | CONFIG_CONSOLE_UART_NUM=0 118 | CONFIG_CONSOLE_UART_BAUDRATE=115200 119 | # CONFIG_ULP_COPROC_ENABLED is not set 120 | CONFIG_ULP_COPROC_RESERVE_MEM=0 121 | # CONFIG_ESP32_PANIC_PRINT_HALT is not set 122 | CONFIG_ESP32_PANIC_PRINT_REBOOT=y 123 | # CONFIG_ESP32_PANIC_SILENT_REBOOT is not set 124 | # CONFIG_ESP32_PANIC_GDBSTUB is not set 125 | CONFIG_ESP32_DEBUG_OCDAWARE=y 126 | CONFIG_INT_WDT=y 127 | CONFIG_INT_WDT_TIMEOUT_MS=300 128 | CONFIG_INT_WDT_CHECK_CPU1=y 129 | CONFIG_TASK_WDT=y 130 | # CONFIG_TASK_WDT_PANIC is not set 131 | CONFIG_TASK_WDT_TIMEOUT_S=5 132 | CONFIG_TASK_WDT_CHECK_IDLE_TASK=y 133 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 134 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set 135 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 136 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set 137 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set 138 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 139 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=0 140 | CONFIG_WIFI_ENABLED=y 141 | CONFIG_ESP32_WIFI_RX_BUFFER_NUM=25 142 | CONFIG_PHY_ENABLED=y 143 | 144 | # 145 | # PHY 146 | # 147 | CONFIG_ESP32_PHY_AUTO_INIT=y 148 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set 149 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 150 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 151 | # CONFIG_ETHERNET is not set 152 | 153 | # 154 | # FreeRTOS 155 | # 156 | # CONFIG_FREERTOS_UNICORE is not set 157 | CONFIG_FREERTOS_CORETIMER_0=y 158 | # CONFIG_FREERTOS_CORETIMER_1 is not set 159 | CONFIG_FREERTOS_HZ=100 160 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 161 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE=y 162 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set 163 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY is not set 164 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 165 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 166 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set 167 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set 168 | CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG=y 169 | # CONFIG_ENABLE_MEMORY_DEBUG is not set 170 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 171 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set 172 | # CONFIG_FREERTOS_DEBUG_INTERNALS is not set 173 | 174 | # 175 | # Log output 176 | # 177 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set 178 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set 179 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set 180 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 181 | # CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set 182 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set 183 | CONFIG_LOG_DEFAULT_LEVEL=3 184 | CONFIG_LOG_COLORS=y 185 | 186 | # 187 | # LWIP 188 | # 189 | # CONFIG_L2_TO_L3_COPY is not set 190 | CONFIG_LWIP_MAX_SOCKETS=4 191 | CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX=0 192 | # CONFIG_LWIP_SO_REUSE is not set 193 | # CONFIG_LWIP_SO_RCVBUF is not set 194 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 195 | # CONFIG_LWIP_IP_FRAG is not set 196 | # CONFIG_LWIP_IP_REASSEMBLY is not set 197 | CONFIG_TCP_MAXRTX=12 198 | CONFIG_TCP_SYNMAXRTX=6 199 | # CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set 200 | 201 | # 202 | # mbedTLS 203 | # 204 | CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 205 | # CONFIG_MBEDTLS_DEBUG is not set 206 | CONFIG_MBEDTLS_HARDWARE_AES=y 207 | CONFIG_MBEDTLS_HARDWARE_MPI=y 208 | CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y 209 | CONFIG_MBEDTLS_HARDWARE_SHA=y 210 | CONFIG_MBEDTLS_HAVE_TIME=y 211 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set 212 | 213 | # 214 | # OpenSSL 215 | # 216 | # CONFIG_OPENSSL_DEBUG is not set 217 | CONFIG_OPENSSL_ASSERT_DO_NOTHING=y 218 | # CONFIG_OPENSSL_ASSERT_EXIT is not set 219 | 220 | # 221 | # SPI Flash driver 222 | # 223 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set 224 | -------------------------------------------------------------------------------- /main/include/ssd1306.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SSD1306_H 2 | #define SSD1306_H 3 | 4 | #include "fonts.h" 5 | #include "stddef.h" 6 | #include "stdlib.h" 7 | #include "string.h" 8 | #include "esp_log.h" 9 | #include "i2c.hpp" 10 | #include 11 | 12 | //! @brief Drawing color 13 | typedef enum { 14 | TRANSPARENT = -1, //!< Transparent (not drawing) 15 | BLACK = 0, //!< Black (pixel off) 16 | WHITE = 1, //!< White (or blue, yellow, pixel on) 17 | INVERT = 2, //!< Invert pixel (XOR) 18 | } ssd1306_color_t; 19 | 20 | //! @brief Panel type 21 | typedef enum { 22 | SSD1306_128x64 = 1, //!< 128x32 panel 23 | SSD1306_128x32 = 2 //!< 128x64 panel 24 | } ssd1306_panel_type_t; 25 | 26 | class OLED { 27 | private: 28 | I2C *i2c; 29 | ssd1306_panel_type_t type; 30 | uint8_t address; // I2C address 31 | uint8_t *buffer; // display buffer 32 | uint8_t width; // panel width (128) 33 | uint8_t height; // panel height (32 or 64) 34 | uint8_t refresh_top = 0; // "Dirty" window 35 | uint8_t refresh_left = 0; 36 | uint8_t refresh_right = 0; 37 | uint8_t refresh_bottom = 0; 38 | const font_info_t* font = NULL; // current font 39 | void command(uint8_t adress, uint8_t c); 40 | void data(uint8_t adress, uint8_t d); 41 | public: 42 | /** 43 | * @brief Constructor 44 | * @param scl_pin SCL Pin 45 | * @param sda_pin SDA Pin 46 | * @param type Panel type 47 | */ 48 | OLED(gpio_num_t scl, gpio_num_t sda, ssd1306_panel_type_t type); 49 | /** 50 | * @brief Constructor 51 | * @param scl_pin SCL Pin 52 | * @param sda_pin SDA Pin 53 | * @param type Panel type 54 | * @param address I2C Address(usually 0x78) 55 | */ 56 | OLED(gpio_num_t scl, gpio_num_t sda, ssd1306_panel_type_t type, 57 | uint8_t address); 58 | /** 59 | * @brief Initialize OLED panel 60 | * @return true if successful 61 | * @remark Possible reasons for failure include non-configured panel type, out of memory or I2C not responding 62 | */ 63 | bool init(); 64 | /** 65 | * @brief De-initialize OLED panel, turn off power and free memory 66 | * @return true if successful 67 | * @remark Possible reasons for failure include non-configured panel type, out of memory or I2C not responding 68 | */ 69 | void term(); 70 | /** 71 | * @brief Return OLED panel height 72 | * @return Panel height, or return 0 if failed (panel not initialized) 73 | */ 74 | uint8_t get_width(); 75 | /** 76 | * @brief Return OLED panel height 77 | * @return Panel height, or return 0 if failed (panel not initialized) 78 | */ 79 | uint8_t get_height(); 80 | /** 81 | * @brief Clear display buffer (fill with black) 82 | */ 83 | void clear(); 84 | /** 85 | * @brief Refresh display (send display buffer to the panel) 86 | * @param force The program automatically tracks "dirty" region to minimize refresh area. Set #force to true 87 | * ignores the dirty region and refresh the whole screen. 88 | */ 89 | void refresh(bool force); 90 | /** 91 | * @brief Draw one pixel 92 | * @param x X coordinate 93 | * @param y Y coordinate 94 | * @param color Color of the pixel 95 | */ 96 | void draw_pixel(int8_t x, int8_t y, ssd1306_color_t color); 97 | /** 98 | * @brief Draw horizontal line 99 | * @param x X coordinate or starting (left) point 100 | * @param y Y coordinate or starting (left) point 101 | * @param w Line width 102 | * @param color Color of the line 103 | */ 104 | void draw_hline(int8_t x, int8_t y, uint8_t w, ssd1306_color_t color); 105 | /** 106 | * @brief Draw vertical line 107 | * @param x X coordinate or starting (top) point 108 | * @param y Y coordinate or starting (top) point 109 | * @param h Line height 110 | * @param color Color of the line 111 | */ 112 | void draw_vline(int8_t x, int8_t y, uint8_t h, ssd1306_color_t color);/** 113 | * @brief Draw a rectangle 114 | * @param x X coordinate or starting (top left) point 115 | * @param y Y coordinate or starting (top left) point 116 | * @param w Rectangle width 117 | * @param h Rectangle height 118 | * @param color Color of the rectangle border 119 | */ 120 | void draw_rectangle(int8_t x, int8_t y, uint8_t w, uint8_t h, 121 | ssd1306_color_t color); 122 | /** 123 | * @brief Draw a filled rectangle 124 | * @param x X coordinate or starting (top left) point 125 | * @param y Y coordinate or starting (top left) point 126 | * @param w Rectangle width 127 | * @param h Rectangle height 128 | * @param color Color of the rectangle 129 | */ 130 | void fill_rectangle(int8_t x, int8_t y, uint8_t w, uint8_t h, 131 | ssd1306_color_t color); 132 | /** 133 | * @brief Draw a filled circle 134 | * @param x0 X coordinate or center 135 | * @param y0 Y coordinate or center 136 | * @param r Radius 137 | * @param color Color of the circle 138 | */ 139 | void draw_circle(int8_t x0, int8_t y0, uint8_t r, ssd1306_color_t color); 140 | /** 141 | * @brief Draw a filled circle 142 | * @param x0 X coordinate or center 143 | * @param y0 Y coordinate or center 144 | * @param r Radius 145 | * @param color Color of the circle 146 | */ 147 | void fill_circle(int8_t x0, int8_t y0, uint8_t r, ssd1306_color_t color); 148 | /** 149 | * @brief Select font for drawing 150 | * @param idx Font index, see fonts.c 151 | */ 152 | void select_font(uint8_t idx); 153 | /** 154 | * @brief Draw one character using currently selected font 155 | * @param x X position of character (top-left corner) 156 | * @param y Y position of character (top-left corner) 157 | * @param c The character to draw 158 | * @param foreground Character color 159 | * @param background Background color 160 | * @return Width of the character 161 | */ 162 | uint8_t draw_char(uint8_t x, uint8_t y, unsigned char c, 163 | ssd1306_color_t foreground, ssd1306_color_t background); 164 | /** 165 | * @brief Draw string using currently selected font 166 | * @param x X position of string (top-left corner) 167 | * @param y Y position of string (top-left corner) 168 | * @param str The string to draw 169 | * @param foreground Character color 170 | * @param background Background color 171 | * @return Width of the string (out-of-display pixels also included) 172 | */ 173 | uint8_t draw_string(uint8_t x, uint8_t y, std::string str, 174 | ssd1306_color_t foreground, ssd1306_color_t background); 175 | /** 176 | * @brief Measure width of string with current selected font 177 | * @param str String to measure 178 | * @return Width of the string 179 | */ 180 | uint8_t measure_string(std::string str); 181 | /** 182 | * @brief Get the height of current selected font 183 | * @return Height of the font (in pixels) or 0 if none font selected 184 | */ 185 | uint8_t get_font_height(); 186 | /** 187 | * @brief Get the "C" value (space between adjacent characters) 188 | * @return "C" value 189 | */ 190 | uint8_t get_font_c(); 191 | /** 192 | * @brief Set normal or inverted display 193 | * @param invert Invert display? 194 | */ 195 | void invert_display(bool invert);/** 196 | * @brief Direct update display buffer 197 | * @param data Data to fill display buffer, no length check is performed! 198 | * @param length Length of data 199 | */ 200 | void update_buffer(uint8_t* data, uint16_t length); 201 | }; 202 | 203 | #endif /* SSD1306_H */ 204 | 205 | -------------------------------------------------------------------------------- /main/ssd1306.cpp: -------------------------------------------------------------------------------- 1 | #include "ssd1306.hpp" 2 | 3 | OLED::OLED(gpio_num_t scl, gpio_num_t sda, ssd1306_panel_type_t type, 4 | uint8_t address) { 5 | i2c = new I2C(scl, sda); 6 | this->type = type; 7 | this->address = address; 8 | 9 | switch (type) { 10 | case SSD1306_128x64: 11 | buffer = NULL; 12 | width = 128; 13 | height = 64; 14 | break; 15 | case SSD1306_128x32: 16 | buffer = NULL; 17 | width = 128; 18 | height = 32; 19 | break; 20 | } 21 | } 22 | 23 | OLED::OLED(gpio_num_t scl, gpio_num_t sda, ssd1306_panel_type_t type) { 24 | i2c = new I2C(scl, sda); 25 | this->type = type; 26 | this->address = 0x78; 27 | 28 | switch (type) { 29 | case SSD1306_128x64: 30 | buffer = (uint8_t*) malloc(1024); // 128 * 64 / 8 31 | width = 128; 32 | height = 64; 33 | break; 34 | case SSD1306_128x32: 35 | buffer = (uint8_t*) malloc(512); // 128 * 32 / 8 36 | width = 128; 37 | height = 32; 38 | break; 39 | } 40 | 41 | } 42 | 43 | void OLED::command(uint8_t adress, uint8_t c) { 44 | bool ret; 45 | i2c->start(); 46 | ret = i2c->write(adress); 47 | if (!ret) // NACK 48 | i2c->stop(); 49 | i2c->write(0x00); // Co = 0, D/C = 0 50 | i2c->write(c); 51 | i2c->stop(); 52 | } 53 | 54 | void OLED::data(uint8_t adress, uint8_t d) { 55 | bool ret; 56 | i2c->start(); 57 | ret = i2c->write(adress); 58 | if (!ret) // NACK 59 | i2c->stop(); 60 | i2c->write(0x40); // Co = 0, D/C = 1 61 | i2c->write(d); 62 | i2c->stop(); 63 | } 64 | 65 | bool OLED::init() { 66 | term(); 67 | 68 | switch (type) { 69 | case SSD1306_128x64: 70 | buffer = (uint8_t*) malloc(1024); // 128 * 64 / 8 71 | break; 72 | case SSD1306_128x32: 73 | buffer = (uint8_t*) malloc(512); // 128 * 32 / 8 74 | break; 75 | } 76 | 77 | if (buffer == NULL) { 78 | ESP_LOGE("oled", "Alloc OLED buffer failed."); 79 | goto oled_init_fail; 80 | } 81 | 82 | // Panel initialization 83 | // Try send I2C address check if the panel is connected 84 | i2c->start(); 85 | if (!i2c->write(address)) { 86 | i2c->stop(); 87 | ESP_LOGE("oled", "OLED I2C bus not responding."); 88 | goto oled_init_fail; 89 | } 90 | i2c->stop(); 91 | 92 | // Now we assume all sending will be successful 93 | if (type == SSD1306_128x64) { 94 | command(address, 0xae); // SSD1306_DISPLAYOFF 95 | command(address, 0xd5); // SSD1306_SETDISPLAYCLOCKDIV 96 | command(address, 0x80); // Suggested value 0x80 97 | command(address, 0xa8); // SSD1306_SETMULTIPLEX 98 | command(address, 0x3f); // 1/64 99 | command(address, 0xd3); // SSD1306_SETDISPLAYOFFSET 100 | command(address, 0x00); // 0 no offset 101 | command(address, 0x40); // SSD1306_SETSTARTLINE line #0 102 | command(address, 0x20); // SSD1306_MEMORYMODE 103 | command(address, 0x00); // 0x0 act like ks0108 104 | command(address, 0xa1); // SSD1306_SEGREMAP | 1 105 | command(address, 0xc8); // SSD1306_COMSCANDEC 106 | command(address, 0xda); // SSD1306_SETCOMPINS 107 | command(address, 0x12); 108 | command(address, 0x81); // SSD1306_SETCONTRAST 109 | command(address, 0xcf); 110 | command(address, 0xd9); // SSD1306_SETPRECHARGE 111 | command(address, 0xf1); 112 | command(address, 0xdb); // SSD1306_SETVCOMDETECT 113 | command(address, 0x30); 114 | command(address, 0x8d); // SSD1306_CHARGEPUMP 115 | command(address, 0x14); // Charge pump on 116 | command(address, 0x2e); // SSD1306_DEACTIVATE_SCROLL 117 | command(address, 0xa4); // SSD1306_DISPLAYALLON_RESUME 118 | command(address, 0xa6); // SSD1306_NORMALDISPLAY 119 | } else if (type == SSD1306_128x32) { 120 | command(address, 0xae); // SSD1306_DISPLAYOFF 121 | command(address, 0xd5); // SSD1306_SETDISPLAYCLOCKDIV 122 | command(address, 0x80); // Suggested value 0x80 123 | command(address, 0xa8); // SSD1306_SETMULTIPLEX 124 | command(address, 0x1f); // 1/32 125 | command(address, 0xd3); // SSD1306_SETDISPLAYOFFSET 126 | command(address, 0x00); // 0 no offset 127 | command(address, 0x40); // SSD1306_SETSTARTLINE line #0 128 | command(address, 0x8d); // SSD1306_CHARGEPUMP 129 | command(address, 0x14); // Charge pump on 130 | command(address, 0x20); // SSD1306_MEMORYMODE 131 | command(address, 0x00); // 0x0 act like ks0108 132 | command(address, 0xa1); // SSD1306_SEGREMAP | 1 133 | command(address, 0xc8); // SSD1306_COMSCANDEC 134 | command(address, 0xda); // SSD1306_SETCOMPINS 135 | command(address, 0x02); 136 | command(address, 0x81); // SSD1306_SETCONTRAST 137 | command(address, 0x2f); 138 | command(address, 0xd9); // SSD1306_SETPRECHARGE 139 | command(address, 0xf1); 140 | command(address, 0xdb); // SSD1306_SETVCOMDETECT 141 | command(address, 0x40); 142 | command(address, 0x2e); // SSD1306_DEACTIVATE_SCROLL 143 | command(address, 0xa4); // SSD1306_DISPLAYALLON_RESUME 144 | command(address, 0xa6); // SSD1306_NORMALDISPLAY 145 | } 146 | 147 | clear(); 148 | refresh(true); 149 | 150 | command(address, 0xaf); // SSD1306_DISPLAYON 151 | 152 | return true; 153 | 154 | oled_init_fail: if (buffer) 155 | free(buffer); 156 | return false; 157 | } 158 | 159 | void OLED::term() { 160 | command(address, 0xae); // SSD_DISPLAYOFF 161 | command(address, 0x8d); // SSD1306_CHARGEPUMP 162 | command(address, 0x10); // Charge pump off 163 | 164 | if (buffer) 165 | free(buffer); 166 | } 167 | 168 | uint8_t OLED::get_width() { 169 | return width; 170 | } 171 | 172 | uint8_t OLED::get_height() { 173 | return height; 174 | } 175 | 176 | void OLED::clear() { 177 | switch (type) { 178 | case SSD1306_128x64: 179 | memset(buffer, 0, 1024); 180 | break; 181 | case SSD1306_128x32: 182 | memset(buffer, 0, 512); 183 | break; 184 | } 185 | refresh_right = width - 1; 186 | refresh_bottom = height - 1; 187 | refresh_top = 0; 188 | refresh_left = 0; 189 | } 190 | 191 | void OLED::refresh( bool force) { 192 | uint8_t i, j; 193 | uint16_t k; 194 | uint8_t page_start, page_end; 195 | 196 | if (force) { 197 | switch (type) { 198 | case SSD1306_128x64: 199 | command(address, 0x21); // SSD1306_COLUMNADDR 200 | command(address, 0); // column start 201 | command(address, 127); // column end 202 | command(address, 0x22); // SSD1306_PAGEADDR 203 | command(address, 0); // page start 204 | command(address, 7); // page end (8 pages for 64 rows OLED) 205 | for (k = 0; k < 1024; k++) { 206 | i2c->start(); 207 | i2c->write(address); 208 | i2c->write(0x40); 209 | for (j = 0; j < 16; ++j) { 210 | i2c->write(buffer[k]); 211 | ++k; 212 | } 213 | --k; 214 | i2c->stop(); 215 | } 216 | break; 217 | case SSD1306_128x32: 218 | command(address, 0x21); // SSD1306_COLUMNADDR 219 | command(address, 0); // column start 220 | command(address, 127); // column end 221 | command(address, 0x22); // SSD1306_PAGEADDR 222 | command(address, 0); // page start 223 | command(address, 3); // page end (4 pages for 32 rows OLED) 224 | for (k = 0; k < 512; k++) { 225 | i2c->start(); 226 | i2c->write(address); 227 | i2c->write(0x40); 228 | for (j = 0; j < 16; ++j) { 229 | i2c->write(buffer[k]); 230 | ++k; 231 | } 232 | --k; 233 | i2c->stop(); 234 | } 235 | break; 236 | } 237 | } else { 238 | if ((refresh_top <= refresh_bottom) 239 | && (refresh_left <= refresh_right)) { 240 | page_start = refresh_top / 8; 241 | page_end = refresh_bottom / 8; 242 | command(address, 0x21); // SSD1306_COLUMNADDR 243 | command(address, refresh_left); // column start 244 | command(address, refresh_right); // column end 245 | command(address, 0x22); // SSD1306_PAGEADDR 246 | command(address, page_start); // page start 247 | command(address, page_end); // page end 248 | k = 0; 249 | for (i = page_start; i <= page_end; ++i) { 250 | for (j = refresh_left; j <= refresh_right; ++j) { 251 | if (k == 0) { 252 | i2c->start(); 253 | i2c->write(address); 254 | i2c->write(0x40); 255 | } 256 | i2c->write(buffer[i * width + j]); 257 | ++k; 258 | if (k == 16) { 259 | i2c->stop(); 260 | k = 0; 261 | } 262 | 263 | } 264 | } 265 | if (k != 0) // for last batch if stop was not sent 266 | i2c->stop(); 267 | } 268 | } 269 | // reset dirty area 270 | refresh_top = 255; 271 | refresh_left = 255; 272 | refresh_right = 0; 273 | refresh_bottom = 0; 274 | } 275 | 276 | void OLED::draw_pixel(int8_t x, int8_t y, ssd1306_color_t color) { 277 | uint16_t index; 278 | 279 | if ((x >= width) || (x < 0) || (y >= height) || (y < 0)) 280 | return; 281 | 282 | index = x + (y / 8) * width; 283 | switch (color) { 284 | case WHITE: 285 | buffer[index] |= (1 << (y & 7)); 286 | break; 287 | case BLACK: 288 | buffer[index] &= ~(1 << (y & 7)); 289 | break; 290 | case INVERT: 291 | buffer[index] ^= (1 << (y & 7)); 292 | break; 293 | default: 294 | break; 295 | } 296 | if (refresh_left > x) 297 | refresh_left = x; 298 | if (refresh_right < x) 299 | refresh_right = x; 300 | if (refresh_top > y) 301 | refresh_top = y; 302 | if (refresh_bottom < y) 303 | refresh_bottom = y; 304 | } 305 | 306 | void OLED::draw_hline(int8_t x, int8_t y, uint8_t w, ssd1306_color_t color) { 307 | uint16_t index; 308 | uint8_t mask, t; 309 | // boundary check 310 | if ((x >= width) || (x < 0) || (y >= height) || (y < 0)) 311 | return; 312 | if (w == 0) 313 | return; 314 | if (x + w > width) 315 | w = width - x; 316 | 317 | t = w; 318 | index = x + (y / 8) * width; 319 | mask = 1 << (y & 7); 320 | switch (color) { 321 | case WHITE: 322 | while (t--) { 323 | buffer[index] |= mask; 324 | ++index; 325 | } 326 | break; 327 | case BLACK: 328 | mask = ~mask; 329 | while (t--) { 330 | buffer[index] &= mask; 331 | ++index; 332 | } 333 | break; 334 | case INVERT: 335 | while (t--) { 336 | buffer[index] ^= mask; 337 | ++index; 338 | } 339 | break; 340 | default: 341 | break; 342 | } 343 | if (refresh_left > x) 344 | refresh_left = x; 345 | if (refresh_right < x + w - 1) 346 | refresh_right = x + w - 1; 347 | if (refresh_top > y) 348 | refresh_top = y; 349 | if (refresh_bottom < y) 350 | refresh_bottom = y; 351 | } 352 | 353 | void OLED::draw_vline(int8_t x, int8_t y, uint8_t h, ssd1306_color_t color) { 354 | uint16_t index; 355 | uint8_t mask, mod, t; 356 | 357 | // boundary check 358 | if ((x >= width) || (x < 0) || (y >= height) || (y < 0)) 359 | return; 360 | if (h == 0) 361 | return; 362 | if (y + h > height) 363 | h = height - y; 364 | 365 | t = h; 366 | index = x + (y / 8) * width; 367 | mod = y & 7; 368 | if (mod) // partial line that does not fit into byte at top 369 | { 370 | // Magic from Adafruit 371 | mod = 8 - mod; 372 | static const uint8_t premask[8] = { 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 373 | 0xFC, 0xFE }; 374 | mask = premask[mod]; 375 | if (t < mod) 376 | mask &= (0xFF >> (mod - t)); 377 | switch (color) { 378 | case WHITE: 379 | buffer[index] |= mask; 380 | break; 381 | case BLACK: 382 | buffer[index] &= ~mask; 383 | break; 384 | case INVERT: 385 | buffer[index] ^= mask; 386 | break; 387 | default: 388 | break; 389 | } 390 | if (t < mod) 391 | goto draw_vline_finish; 392 | t -= mod; 393 | index += width; 394 | } 395 | if (t >= 8) // byte aligned line at middle 396 | { 397 | switch (color) { 398 | case WHITE: 399 | do { 400 | buffer[index] = 0xff; 401 | index += width; 402 | t -= 8; 403 | } while (t >= 8); 404 | break; 405 | case BLACK: 406 | do { 407 | buffer[index] = 0x00; 408 | index += width; 409 | t -= 8; 410 | } while (t >= 8); 411 | break; 412 | case INVERT: 413 | do { 414 | buffer[index] = ~buffer[index]; 415 | index += width; 416 | t -= 8; 417 | } while (t >= 8); 418 | break; 419 | default: 420 | break; 421 | } 422 | } 423 | if (t) // // partial line at bottom 424 | { 425 | mod = t & 7; 426 | static const uint8_t postmask[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 427 | 0x3F, 0x7F }; 428 | mask = postmask[mod]; 429 | switch (color) { 430 | case WHITE: 431 | buffer[index] |= mask; 432 | break; 433 | case BLACK: 434 | buffer[index] &= ~mask; 435 | break; 436 | case INVERT: 437 | buffer[index] ^= mask; 438 | break; 439 | default: 440 | break; 441 | } 442 | } 443 | draw_vline_finish: if (refresh_left > x) 444 | refresh_left = x; 445 | if (refresh_right < x) 446 | refresh_right = x; 447 | if (refresh_top > y) 448 | refresh_top = y; 449 | if (refresh_bottom < y + h - 1) 450 | refresh_bottom = y + h - 1; 451 | return; 452 | } 453 | 454 | void OLED::draw_rectangle(int8_t x, int8_t y, uint8_t w, uint8_t h, 455 | ssd1306_color_t color) { 456 | draw_hline(x, y, w, color); 457 | draw_hline(x, y + h - 1, w, color); 458 | draw_vline(x, y, h, color); 459 | draw_vline(x + w - 1, y, h, color); 460 | } 461 | 462 | void OLED::fill_rectangle(int8_t x, int8_t y, uint8_t w, uint8_t h, 463 | ssd1306_color_t color) { 464 | // Can be optimized? 465 | uint8_t i; 466 | for (i = x; i < x + w; ++i) 467 | draw_vline(i, y, h, color); 468 | } 469 | 470 | void OLED::draw_circle(int8_t x0, int8_t y0, uint8_t r, ssd1306_color_t color) { 471 | // Refer to http://en.wikipedia.org/wiki/Midpoint_circle_algorithm for the algorithm 472 | 473 | int8_t x = r; 474 | int8_t y = 1; 475 | int16_t radius_err = 1 - x; 476 | 477 | if (r == 0) 478 | return; 479 | 480 | draw_pixel(x0 - r, y0, color); 481 | draw_pixel(x0 + r, y0, color); 482 | draw_pixel(x0, y0 - r, color); 483 | draw_pixel(x0, y0 + r, color); 484 | 485 | while (x >= y) { 486 | draw_pixel(x0 + x, y0 + y, color); 487 | draw_pixel(x0 - x, y0 + y, color); 488 | draw_pixel(x0 + x, y0 - y, color); 489 | draw_pixel(x0 - x, y0 - y, color); 490 | if (x != y) { 491 | /* Otherwise the 4 drawings below are the same as above, causing 492 | * problem when color is INVERT 493 | */ 494 | draw_pixel(x0 + y, y0 + x, color); 495 | draw_pixel(x0 - y, y0 + x, color); 496 | draw_pixel(x0 + y, y0 - x, color); 497 | draw_pixel(x0 - y, y0 - x, color); 498 | } 499 | ++y; 500 | if (radius_err < 0) { 501 | radius_err += 2 * y + 1; 502 | } else { 503 | --x; 504 | radius_err += 2 * (y - x + 1); 505 | } 506 | 507 | } 508 | } 509 | 510 | void OLED::fill_circle(int8_t x0, int8_t y0, uint8_t r, ssd1306_color_t color) { 511 | int8_t x = 1; 512 | int8_t y = r; 513 | int16_t radius_err = 1 - y; 514 | int8_t x1; 515 | 516 | if (r == 0) 517 | return; 518 | 519 | draw_vline(x0, y0 - r, 2 * r + 1, color); // Center vertical line 520 | while (y >= x) { 521 | draw_vline(x0 - x, y0 - y, 2 * y + 1, color); 522 | draw_vline(x0 + x, y0 - y, 2 * y + 1, color); 523 | if (color != INVERT) { 524 | draw_vline(x0 - y, y0 - x, 2 * x + 1, color); 525 | draw_vline(x0 + y, y0 - x, 2 * x + 1, color); 526 | } 527 | ++x; 528 | if (radius_err < 0) { 529 | radius_err += 2 * x + 1; 530 | } else { 531 | --y; 532 | radius_err += 2 * (x - y + 1); 533 | } 534 | } 535 | 536 | if (color == INVERT) { 537 | x1 = x; // Save where we stopped 538 | 539 | y = 1; 540 | x = r; 541 | radius_err = 1 - x; 542 | draw_hline(x0 + x1, y0, r - x1 + 1, color); 543 | draw_hline(x0 - r, y0, r - x1 + 1, color); 544 | while (x >= y) { 545 | draw_hline(x0 + x1, y0 - y, x - x1 + 1, color); 546 | draw_hline(x0 + x1, y0 + y, x - x1 + 1, color); 547 | draw_hline(x0 - x, y0 - y, x - x1 + 1, color); 548 | draw_hline(x0 - x, y0 + y, x - x1 + 1, color); 549 | ++y; 550 | if (radius_err < 0) { 551 | radius_err += 2 * y + 1; 552 | } else { 553 | --x; 554 | radius_err += 2 * (y - x + 1); 555 | } 556 | } 557 | } 558 | } 559 | 560 | void OLED::select_font(uint8_t idx) { 561 | if (idx < NUM_FONTS) 562 | font = fonts[idx]; 563 | } 564 | 565 | // return character width 566 | uint8_t OLED::draw_char(uint8_t x, uint8_t y, unsigned char c, 567 | ssd1306_color_t foreground, ssd1306_color_t background) { 568 | uint8_t i, j; 569 | const uint8_t *bitmap; 570 | uint8_t line = 0; 571 | 572 | if (font == NULL) 573 | return 0; 574 | 575 | // we always have space in the font set 576 | if ((c < font->char_start) || (c > font->char_end)) 577 | c = ' '; 578 | c = c - font->char_start; // c now become index to tables 579 | bitmap = font->bitmap + font->char_descriptors[c].offset; 580 | for (j = 0; j < font->height; ++j) { 581 | for (i = 0; i < font->char_descriptors[c].width; ++i) { 582 | if (i % 8 == 0) { 583 | line = bitmap[(font->char_descriptors[c].width + 7) / 8 * j 584 | + i / 8]; // line data 585 | } 586 | if (line & 0x80) { 587 | draw_pixel(x + i, y + j, foreground); 588 | } else { 589 | switch (background) { 590 | case TRANSPARENT: 591 | // Not drawing for transparent background 592 | break; 593 | case WHITE: 594 | case BLACK: 595 | draw_pixel(x + i, y + j, background); 596 | break; 597 | case INVERT: 598 | // I don't know why I need invert background 599 | break; 600 | } 601 | } 602 | line = line << 1; 603 | } 604 | } 605 | return (font->char_descriptors[c].width); 606 | } 607 | 608 | uint8_t OLED::draw_string(uint8_t x, uint8_t y, std::string str, 609 | ssd1306_color_t foreground, ssd1306_color_t background) { 610 | uint8_t t = x; 611 | 612 | if (font == NULL) 613 | return 0; 614 | 615 | // if(str==NULL) 616 | // return 0; 617 | 618 | if (str.empty()) 619 | return 0; 620 | 621 | for (std::string::iterator i = str.begin(); i < str.end(); i++) { 622 | x += draw_char(x, y, *i, foreground, background); 623 | if (*i) 624 | x += font->c; 625 | } 626 | 627 | // while (*str) { 628 | // x += draw_char(x, y, *str, foreground, background); 629 | // ++str; 630 | // if (*str) 631 | // x += font->c; 632 | // } 633 | 634 | return (x - t); 635 | } 636 | 637 | // return width of string 638 | uint8_t OLED::measure_string(std::string str) { 639 | uint8_t w = 0; 640 | unsigned char c; 641 | 642 | if (str.empty()) 643 | return 0; 644 | 645 | // if(str==NULL) 646 | // return 0; 647 | 648 | if (font == NULL) 649 | return 0; 650 | 651 | for (std::string::iterator i = str.begin(); i < str.end(); i++) { 652 | c = *i; 653 | // we always have space in the font set 654 | if ((c < font->char_start) || (c > font->char_end)) 655 | c = ' '; 656 | c = c - font->char_start; // c now become index to tables 657 | w += font->char_descriptors[c].width; 658 | if (*i) 659 | w += font->c; 660 | } 661 | 662 | // while (*str) { 663 | // c = *str; 664 | // // we always have space in the font set 665 | // if ((c < font->char_start) || (c > font->char_end)) 666 | // c = ' '; 667 | // c = c - font->char_start; // c now become index to tables 668 | // w += font->char_descriptors[c].width; 669 | // ++str; 670 | // if (*str) 671 | // w += font->c; 672 | // } 673 | return w; 674 | } 675 | 676 | uint8_t OLED::get_font_height() { 677 | if (font == NULL) 678 | return 0; 679 | 680 | return (font->height); 681 | } 682 | 683 | uint8_t OLED::get_font_c() { 684 | if (font == NULL) 685 | return 0; 686 | 687 | return (font->c); 688 | } 689 | 690 | void OLED::invert_display(bool invert) { 691 | if (invert) 692 | command(address, 0xa7); // SSD1306_INVERTDISPLAY 693 | else 694 | command(address, 0xa6); // SSD1306_NORMALDISPLAY 695 | 696 | } 697 | 698 | void OLED::update_buffer(uint8_t* data, uint16_t length) { 699 | if (type == SSD1306_128x64) { 700 | memcpy(buffer, data, (length < 1024) ? length : 1024); 701 | 702 | } else if (type == SSD1306_128x32) { 703 | memcpy(buffer, data, (length < 512) ? length : 512); 704 | } 705 | refresh_right = width - 1; 706 | refresh_bottom = height - 1; 707 | refresh_top = 0; 708 | refresh_left = 0; 709 | } 710 | -------------------------------------------------------------------------------- /main/font_tahoma_8pt.c: -------------------------------------------------------------------------------- 1 | /* 2 | *font_tahoma_8pt.c 3 | * 4 | * Created on: Jan 3, 2015 5 | * Author: Baoshi 6 | */ 7 | //#include "esp_common.h" 8 | #include "fonts.h" 9 | 10 | /* 11 | ** Font data for Tahoma 8pt 12 | */ 13 | 14 | /* Character bitmaps for Tahoma 8pt */ 15 | const uint8_t tahoma_8pt_bitmaps[] = 16 | { 17 | /* @0 ' ' (1 pixels wide) */ 18 | 0x00, // 19 | 0x00, // 20 | 0x00, // 21 | 0x00, // 22 | 0x00, // 23 | 0x00, // 24 | 0x00, // 25 | 0x00, // 26 | 0x00, // 27 | 0x00, // 28 | 0x00, // 29 | 30 | /* @11 '!' (1 pixels wide) */ 31 | 0x00, // 32 | 0x80, // # 33 | 0x80, // # 34 | 0x80, // # 35 | 0x80, // # 36 | 0x80, // # 37 | 0x80, // # 38 | 0x00, // 39 | 0x80, // # 40 | 0x00, // 41 | 0x00, // 42 | 43 | /* @22 '"' (3 pixels wide) */ 44 | 0xA0, // # # 45 | 0xA0, // # # 46 | 0xA0, // # # 47 | 0x00, // 48 | 0x00, // 49 | 0x00, // 50 | 0x00, // 51 | 0x00, // 52 | 0x00, // 53 | 0x00, // 54 | 0x00, // 55 | 56 | /* @33 '#' (7 pixels wide) */ 57 | 0x00, // 58 | 0x14, // # # 59 | 0x14, // # # 60 | 0x7E, // ###### 61 | 0x28, // # # 62 | 0x28, // # # 63 | 0xFC, // ###### 64 | 0x50, // # # 65 | 0x50, // # # 66 | 0x00, // 67 | 0x00, // 68 | 69 | /* @44 '$' (5 pixels wide) */ 70 | 0x20, // # 71 | 0x20, // # 72 | 0x78, // #### 73 | 0xA0, // # # 74 | 0xA0, // # # 75 | 0x70, // ### 76 | 0x28, // # # 77 | 0x28, // # # 78 | 0xF0, // #### 79 | 0x20, // # 80 | 0x20, // # 81 | 82 | /* @55 '%' (10 pixels wide) */ 83 | 0x00, 0x00, // 84 | 0x62, 0x00, // ## # 85 | 0x92, 0x00, // # # # 86 | 0x94, 0x00, // # # # 87 | 0x64, 0x00, // ## # 88 | 0x09, 0x80, // # ## 89 | 0x0A, 0x40, // # # # 90 | 0x12, 0x40, // # # # 91 | 0x11, 0x80, // # ## 92 | 0x00, 0x00, // 93 | 0x00, 0x00, // 94 | 95 | /* @77 '&' (7 pixels wide) */ 96 | 0x00, // 97 | 0x60, // ## 98 | 0x90, // # # 99 | 0x90, // # # 100 | 0x64, // ## # 101 | 0x94, // # # # 102 | 0x88, // # # 103 | 0x8C, // # ## 104 | 0x72, // ### # 105 | 0x00, // 106 | 0x00, // 107 | 108 | /* @88 ''' (1 pixels wide) */ 109 | 0x80, // # 110 | 0x80, // # 111 | 0x80, // # 112 | 0x00, // 113 | 0x00, // 114 | 0x00, // 115 | 0x00, // 116 | 0x00, // 117 | 0x00, // 118 | 0x00, // 119 | 0x00, // 120 | 121 | /* @99 '(' (3 pixels wide) */ 122 | 0x20, // # 123 | 0x40, // # 124 | 0x40, // # 125 | 0x80, // # 126 | 0x80, // # 127 | 0x80, // # 128 | 0x80, // # 129 | 0x80, // # 130 | 0x40, // # 131 | 0x40, // # 132 | 0x20, // # 133 | 134 | /* @110 ')' (3 pixels wide) */ 135 | 0x80, // # 136 | 0x40, // # 137 | 0x40, // # 138 | 0x20, // # 139 | 0x20, // # 140 | 0x20, // # 141 | 0x20, // # 142 | 0x20, // # 143 | 0x40, // # 144 | 0x40, // # 145 | 0x80, // # 146 | 147 | /* @121 '*' (5 pixels wide) */ 148 | 0x20, // # 149 | 0xA8, // # # # 150 | 0x70, // ### 151 | 0xA8, // # # # 152 | 0x20, // # 153 | 0x00, // 154 | 0x00, // 155 | 0x00, // 156 | 0x00, // 157 | 0x00, // 158 | 0x00, // 159 | 160 | /* @132 '+' (7 pixels wide) */ 161 | 0x00, // 162 | 0x00, // 163 | 0x10, // # 164 | 0x10, // # 165 | 0x10, // # 166 | 0xFE, // ####### 167 | 0x10, // # 168 | 0x10, // # 169 | 0x10, // # 170 | 0x00, // 171 | 0x00, // 172 | 173 | /* @143 ',' (2 pixels wide) */ 174 | 0x00, // 175 | 0x00, // 176 | 0x00, // 177 | 0x00, // 178 | 0x00, // 179 | 0x00, // 180 | 0x00, // 181 | 0x40, // # 182 | 0x40, // # 183 | 0x40, // # 184 | 0x80, // # 185 | 186 | /* @154 '-' (3 pixels wide) */ 187 | 0x00, // 188 | 0x00, // 189 | 0x00, // 190 | 0x00, // 191 | 0x00, // 192 | 0xE0, // ### 193 | 0x00, // 194 | 0x00, // 195 | 0x00, // 196 | 0x00, // 197 | 0x00, // 198 | 199 | /* @165 '.' (1 pixels wide) */ 200 | 0x00, // 201 | 0x00, // 202 | 0x00, // 203 | 0x00, // 204 | 0x00, // 205 | 0x00, // 206 | 0x00, // 207 | 0x80, // # 208 | 0x80, // # 209 | 0x00, // 210 | 0x00, // 211 | 212 | /* @176 '/' (3 pixels wide) */ 213 | 0x20, // # 214 | 0x20, // # 215 | 0x20, // # 216 | 0x40, // # 217 | 0x40, // # 218 | 0x40, // # 219 | 0x40, // # 220 | 0x40, // # 221 | 0x80, // # 222 | 0x80, // # 223 | 0x80, // # 224 | 225 | /* @187 '0' (5 pixels wide) */ 226 | 0x00, // 227 | 0x70, // ### 228 | 0x88, // # # 229 | 0x88, // # # 230 | 0x88, // # # 231 | 0x88, // # # 232 | 0x88, // # # 233 | 0x88, // # # 234 | 0x70, // ### 235 | 0x00, // 236 | 0x00, // 237 | 238 | /* @198 '1' (3 pixels wide) */ 239 | 0x00, // 240 | 0x40, // # 241 | 0xC0, // ## 242 | 0x40, // # 243 | 0x40, // # 244 | 0x40, // # 245 | 0x40, // # 246 | 0x40, // # 247 | 0xE0, // ### 248 | 0x00, // 249 | 0x00, // 250 | 251 | /* @209 '2' (5 pixels wide) */ 252 | 0x00, // 253 | 0x70, // ### 254 | 0x88, // # # 255 | 0x08, // # 256 | 0x10, // # 257 | 0x20, // # 258 | 0x40, // # 259 | 0x80, // # 260 | 0xF8, // ##### 261 | 0x00, // 262 | 0x00, // 263 | 264 | /* @220 '3' (5 pixels wide) */ 265 | 0x00, // 266 | 0x70, // ### 267 | 0x88, // # # 268 | 0x08, // # 269 | 0x30, // ## 270 | 0x08, // # 271 | 0x08, // # 272 | 0x88, // # # 273 | 0x70, // ### 274 | 0x00, // 275 | 0x00, // 276 | 277 | /* @231 '4' (5 pixels wide) */ 278 | 0x00, // 279 | 0x10, // # 280 | 0x30, // ## 281 | 0x50, // # # 282 | 0x90, // # # 283 | 0xF8, // ##### 284 | 0x10, // # 285 | 0x10, // # 286 | 0x10, // # 287 | 0x00, // 288 | 0x00, // 289 | 290 | /* @242 '5' (5 pixels wide) */ 291 | 0x00, // 292 | 0xF8, // ##### 293 | 0x80, // # 294 | 0x80, // # 295 | 0xF0, // #### 296 | 0x08, // # 297 | 0x08, // # 298 | 0x88, // # # 299 | 0x70, // ### 300 | 0x00, // 301 | 0x00, // 302 | 303 | /* @253 '6' (5 pixels wide) */ 304 | 0x00, // 305 | 0x30, // ## 306 | 0x40, // # 307 | 0x80, // # 308 | 0xF0, // #### 309 | 0x88, // # # 310 | 0x88, // # # 311 | 0x88, // # # 312 | 0x70, // ### 313 | 0x00, // 314 | 0x00, // 315 | 316 | /* @264 '7' (5 pixels wide) */ 317 | 0x00, // 318 | 0xF8, // ##### 319 | 0x08, // # 320 | 0x10, // # 321 | 0x10, // # 322 | 0x20, // # 323 | 0x20, // # 324 | 0x40, // # 325 | 0x40, // # 326 | 0x00, // 327 | 0x00, // 328 | 329 | /* @275 '8' (5 pixels wide) */ 330 | 0x00, // 331 | 0x70, // ### 332 | 0x88, // # # 333 | 0x88, // # # 334 | 0x70, // ### 335 | 0x88, // # # 336 | 0x88, // # # 337 | 0x88, // # # 338 | 0x70, // ### 339 | 0x00, // 340 | 0x00, // 341 | 342 | /* @286 '9' (5 pixels wide) */ 343 | 0x00, // 344 | 0x70, // ### 345 | 0x88, // # # 346 | 0x88, // # # 347 | 0x88, // # # 348 | 0x78, // #### 349 | 0x08, // # 350 | 0x10, // # 351 | 0x60, // ## 352 | 0x00, // 353 | 0x00, // 354 | 355 | /* @297 ':' (1 pixels wide) */ 356 | 0x00, // 357 | 0x00, // 358 | 0x00, // 359 | 0x80, // # 360 | 0x80, // # 361 | 0x00, // 362 | 0x00, // 363 | 0x80, // # 364 | 0x80, // # 365 | 0x00, // 366 | 0x00, // 367 | 368 | /* @308 ';' (2 pixels wide) */ 369 | 0x00, // 370 | 0x00, // 371 | 0x00, // 372 | 0x40, // # 373 | 0x40, // # 374 | 0x00, // 375 | 0x00, // 376 | 0x40, // # 377 | 0x40, // # 378 | 0x40, // # 379 | 0x80, // # 380 | 381 | /* @319 '<' (6 pixels wide) */ 382 | 0x00, // 383 | 0x00, // 384 | 0x04, // # 385 | 0x18, // ## 386 | 0x60, // ## 387 | 0x80, // # 388 | 0x60, // ## 389 | 0x18, // ## 390 | 0x04, // # 391 | 0x00, // 392 | 0x00, // 393 | 394 | /* @330 '=' (7 pixels wide) */ 395 | 0x00, // 396 | 0x00, // 397 | 0x00, // 398 | 0x00, // 399 | 0xFE, // ####### 400 | 0x00, // 401 | 0xFE, // ####### 402 | 0x00, // 403 | 0x00, // 404 | 0x00, // 405 | 0x00, // 406 | 407 | /* @341 '>' (6 pixels wide) */ 408 | 0x00, // 409 | 0x00, // 410 | 0x80, // # 411 | 0x60, // ## 412 | 0x18, // ## 413 | 0x04, // # 414 | 0x18, // ## 415 | 0x60, // ## 416 | 0x80, // # 417 | 0x00, // 418 | 0x00, // 419 | 420 | /* @352 '?' (4 pixels wide) */ 421 | 0x00, // 422 | 0xE0, // ### 423 | 0x10, // # 424 | 0x10, // # 425 | 0x20, // # 426 | 0x40, // # 427 | 0x40, // # 428 | 0x00, // 429 | 0x40, // # 430 | 0x00, // 431 | 0x00, // 432 | 433 | /* @363 '@' (9 pixels wide) */ 434 | 0x00, 0x00, // 435 | 0x3E, 0x00, // ##### 436 | 0x41, 0x00, // # # 437 | 0x9C, 0x80, // # ### # 438 | 0xA4, 0x80, // # # # # 439 | 0xA4, 0x80, // # # # # 440 | 0xA4, 0x80, // # # # # 441 | 0x9F, 0x00, // # ##### 442 | 0x40, 0x00, // # 443 | 0x3C, 0x00, // #### 444 | 0x00, 0x00, // 445 | 446 | /* @385 'A' (6 pixels wide) */ 447 | 0x00, // 448 | 0x30, // ## 449 | 0x30, // ## 450 | 0x48, // # # 451 | 0x48, // # # 452 | 0x48, // # # 453 | 0xFC, // ###### 454 | 0x84, // # # 455 | 0x84, // # # 456 | 0x00, // 457 | 0x00, // 458 | 459 | /* @396 'B' (5 pixels wide) */ 460 | 0x00, // 461 | 0xF0, // #### 462 | 0x88, // # # 463 | 0x88, // # # 464 | 0xF0, // #### 465 | 0x88, // # # 466 | 0x88, // # # 467 | 0x88, // # # 468 | 0xF0, // #### 469 | 0x00, // 470 | 0x00, // 471 | 472 | /* @407 'C' (6 pixels wide) */ 473 | 0x00, // 474 | 0x3C, // #### 475 | 0x40, // # 476 | 0x80, // # 477 | 0x80, // # 478 | 0x80, // # 479 | 0x80, // # 480 | 0x40, // # 481 | 0x3C, // #### 482 | 0x00, // 483 | 0x00, // 484 | 485 | /* @418 'D' (6 pixels wide) */ 486 | 0x00, // 487 | 0xF0, // #### 488 | 0x88, // # # 489 | 0x84, // # # 490 | 0x84, // # # 491 | 0x84, // # # 492 | 0x84, // # # 493 | 0x88, // # # 494 | 0xF0, // #### 495 | 0x00, // 496 | 0x00, // 497 | 498 | /* @429 'E' (5 pixels wide) */ 499 | 0x00, // 500 | 0xF8, // ##### 501 | 0x80, // # 502 | 0x80, // # 503 | 0xF0, // #### 504 | 0x80, // # 505 | 0x80, // # 506 | 0x80, // # 507 | 0xF8, // ##### 508 | 0x00, // 509 | 0x00, // 510 | 511 | /* @440 'F' (5 pixels wide) */ 512 | 0x00, // 513 | 0xF8, // ##### 514 | 0x80, // # 515 | 0x80, // # 516 | 0xF8, // ##### 517 | 0x80, // # 518 | 0x80, // # 519 | 0x80, // # 520 | 0x80, // # 521 | 0x00, // 522 | 0x00, // 523 | 524 | /* @451 'G' (6 pixels wide) */ 525 | 0x00, // 526 | 0x3C, // #### 527 | 0x40, // # 528 | 0x80, // # 529 | 0x80, // # 530 | 0x9C, // # ### 531 | 0x84, // # # 532 | 0x44, // # # 533 | 0x3C, // #### 534 | 0x00, // 535 | 0x00, // 536 | 537 | /* @462 'H' (6 pixels wide) */ 538 | 0x00, // 539 | 0x84, // # # 540 | 0x84, // # # 541 | 0x84, // # # 542 | 0xFC, // ###### 543 | 0x84, // # # 544 | 0x84, // # # 545 | 0x84, // # # 546 | 0x84, // # # 547 | 0x00, // 548 | 0x00, // 549 | 550 | /* @473 'I' (3 pixels wide) */ 551 | 0x00, // 552 | 0xE0, // ### 553 | 0x40, // # 554 | 0x40, // # 555 | 0x40, // # 556 | 0x40, // # 557 | 0x40, // # 558 | 0x40, // # 559 | 0xE0, // ### 560 | 0x00, // 561 | 0x00, // 562 | 563 | /* @484 'J' (4 pixels wide) */ 564 | 0x00, // 565 | 0x70, // ### 566 | 0x10, // # 567 | 0x10, // # 568 | 0x10, // # 569 | 0x10, // # 570 | 0x10, // # 571 | 0x10, // # 572 | 0xE0, // ### 573 | 0x00, // 574 | 0x00, // 575 | 576 | /* @495 'K' (5 pixels wide) */ 577 | 0x00, // 578 | 0x88, // # # 579 | 0x90, // # # 580 | 0xA0, // # # 581 | 0xC0, // ## 582 | 0xC0, // ## 583 | 0xA0, // # # 584 | 0x90, // # # 585 | 0x88, // # # 586 | 0x00, // 587 | 0x00, // 588 | 589 | /* @506 'L' (4 pixels wide) */ 590 | 0x00, // 591 | 0x80, // # 592 | 0x80, // # 593 | 0x80, // # 594 | 0x80, // # 595 | 0x80, // # 596 | 0x80, // # 597 | 0x80, // # 598 | 0xF0, // #### 599 | 0x00, // 600 | 0x00, // 601 | 602 | /* @517 'M' (7 pixels wide) */ 603 | 0x00, // 604 | 0xC6, // ## ## 605 | 0xC6, // ## ## 606 | 0xAA, // # # # # 607 | 0xAA, // # # # # 608 | 0x92, // # # # 609 | 0x92, // # # # 610 | 0x82, // # # 611 | 0x82, // # # 612 | 0x00, // 613 | 0x00, // 614 | 615 | /* @528 'N' (6 pixels wide) */ 616 | 0x00, // 617 | 0xC4, // ## # 618 | 0xC4, // ## # 619 | 0xA4, // # # # 620 | 0xA4, // # # # 621 | 0x94, // # # # 622 | 0x94, // # # # 623 | 0x8C, // # ## 624 | 0x8C, // # ## 625 | 0x00, // 626 | 0x00, // 627 | 628 | /* @539 'O' (7 pixels wide) */ 629 | 0x00, // 630 | 0x38, // ### 631 | 0x44, // # # 632 | 0x82, // # # 633 | 0x82, // # # 634 | 0x82, // # # 635 | 0x82, // # # 636 | 0x44, // # # 637 | 0x38, // ### 638 | 0x00, // 639 | 0x00, // 640 | 641 | /* @550 'P' (5 pixels wide) */ 642 | 0x00, // 643 | 0xF0, // #### 644 | 0x88, // # # 645 | 0x88, // # # 646 | 0x88, // # # 647 | 0xF0, // #### 648 | 0x80, // # 649 | 0x80, // # 650 | 0x80, // # 651 | 0x00, // 652 | 0x00, // 653 | 654 | /* @561 'Q' (7 pixels wide) */ 655 | 0x00, // 656 | 0x38, // ### 657 | 0x44, // # # 658 | 0x82, // # # 659 | 0x82, // # # 660 | 0x82, // # # 661 | 0x82, // # # 662 | 0x44, // # # 663 | 0x38, // ### 664 | 0x08, // # 665 | 0x06, // ## 666 | 667 | /* @572 'R' (6 pixels wide) */ 668 | 0x00, // 669 | 0xF0, // #### 670 | 0x88, // # # 671 | 0x88, // # # 672 | 0x88, // # # 673 | 0xF0, // #### 674 | 0x90, // # # 675 | 0x88, // # # 676 | 0x84, // # # 677 | 0x00, // 678 | 0x00, // 679 | 680 | /* @583 'S' (5 pixels wide) */ 681 | 0x00, // 682 | 0x78, // #### 683 | 0x80, // # 684 | 0x80, // # 685 | 0x70, // ### 686 | 0x08, // # 687 | 0x08, // # 688 | 0x08, // # 689 | 0xF0, // #### 690 | 0x00, // 691 | 0x00, // 692 | 693 | /* @594 'T' (5 pixels wide) */ 694 | 0x00, // 695 | 0xF8, // ##### 696 | 0x20, // # 697 | 0x20, // # 698 | 0x20, // # 699 | 0x20, // # 700 | 0x20, // # 701 | 0x20, // # 702 | 0x20, // # 703 | 0x00, // 704 | 0x00, // 705 | 706 | /* @605 'U' (6 pixels wide) */ 707 | 0x00, // 708 | 0x84, // # # 709 | 0x84, // # # 710 | 0x84, // # # 711 | 0x84, // # # 712 | 0x84, // # # 713 | 0x84, // # # 714 | 0x84, // # # 715 | 0x78, // #### 716 | 0x00, // 717 | 0x00, // 718 | 719 | /* @616 'V' (5 pixels wide) */ 720 | 0x00, // 721 | 0x88, // # # 722 | 0x88, // # # 723 | 0x88, // # # 724 | 0x50, // # # 725 | 0x50, // # # 726 | 0x50, // # # 727 | 0x20, // # 728 | 0x20, // # 729 | 0x00, // 730 | 0x00, // 731 | 732 | /* @627 'W' (9 pixels wide) */ 733 | 0x00, 0x00, // 734 | 0x88, 0x80, // # # # 735 | 0x88, 0x80, // # # # 736 | 0x88, 0x80, // # # # 737 | 0x55, 0x00, // # # # # 738 | 0x55, 0x00, // # # # # 739 | 0x55, 0x00, // # # # # 740 | 0x22, 0x00, // # # 741 | 0x22, 0x00, // # # 742 | 0x00, 0x00, // 743 | 0x00, 0x00, // 744 | 745 | /* @649 'X' (5 pixels wide) */ 746 | 0x00, // 747 | 0x88, // # # 748 | 0x88, // # # 749 | 0x50, // # # 750 | 0x20, // # 751 | 0x20, // # 752 | 0x50, // # # 753 | 0x88, // # # 754 | 0x88, // # # 755 | 0x00, // 756 | 0x00, // 757 | 758 | /* @660 'Y' (5 pixels wide) */ 759 | 0x00, // 760 | 0x88, // # # 761 | 0x88, // # # 762 | 0x50, // # # 763 | 0x50, // # # 764 | 0x20, // # 765 | 0x20, // # 766 | 0x20, // # 767 | 0x20, // # 768 | 0x00, // 769 | 0x00, // 770 | 771 | /* @671 'Z' (5 pixels wide) */ 772 | 0x00, // 773 | 0xF8, // ##### 774 | 0x08, // # 775 | 0x10, // # 776 | 0x20, // # 777 | 0x20, // # 778 | 0x40, // # 779 | 0x80, // # 780 | 0xF8, // ##### 781 | 0x00, // 782 | 0x00, // 783 | 784 | /* @682 '[' (3 pixels wide) */ 785 | 0xE0, // ### 786 | 0x80, // # 787 | 0x80, // # 788 | 0x80, // # 789 | 0x80, // # 790 | 0x80, // # 791 | 0x80, // # 792 | 0x80, // # 793 | 0x80, // # 794 | 0x80, // # 795 | 0xE0, // ### 796 | 797 | /* @693 '\' (3 pixels wide) */ 798 | 0x80, // # 799 | 0x80, // # 800 | 0x80, // # 801 | 0x40, // # 802 | 0x40, // # 803 | 0x40, // # 804 | 0x40, // # 805 | 0x40, // # 806 | 0x20, // # 807 | 0x20, // # 808 | 0x20, // # 809 | 810 | /* @704 ']' (3 pixels wide) */ 811 | 0xE0, // ### 812 | 0x20, // # 813 | 0x20, // # 814 | 0x20, // # 815 | 0x20, // # 816 | 0x20, // # 817 | 0x20, // # 818 | 0x20, // # 819 | 0x20, // # 820 | 0x20, // # 821 | 0xE0, // ### 822 | 823 | /* @715 '^' (7 pixels wide) */ 824 | 0x00, // 825 | 0x10, // # 826 | 0x28, // # # 827 | 0x44, // # # 828 | 0x82, // # # 829 | 0x00, // 830 | 0x00, // 831 | 0x00, // 832 | 0x00, // 833 | 0x00, // 834 | 0x00, // 835 | 836 | /* @726 '_' (6 pixels wide) */ 837 | 0x00, // 838 | 0x00, // 839 | 0x00, // 840 | 0x00, // 841 | 0x00, // 842 | 0x00, // 843 | 0x00, // 844 | 0x00, // 845 | 0x00, // 846 | 0x00, // 847 | 0xFC, // ###### 848 | 849 | /* @737 '`' (2 pixels wide) */ 850 | 0x80, // # 851 | 0x40, // # 852 | 0x00, // 853 | 0x00, // 854 | 0x00, // 855 | 0x00, // 856 | 0x00, // 857 | 0x00, // 858 | 0x00, // 859 | 0x00, // 860 | 0x00, // 861 | 862 | /* @748 'a' (5 pixels wide) */ 863 | 0x00, // 864 | 0x00, // 865 | 0x00, // 866 | 0x70, // ### 867 | 0x08, // # 868 | 0x78, // #### 869 | 0x88, // # # 870 | 0x88, // # # 871 | 0x78, // #### 872 | 0x00, // 873 | 0x00, // 874 | 875 | /* @759 'b' (5 pixels wide) */ 876 | 0x80, // # 877 | 0x80, // # 878 | 0x80, // # 879 | 0xF0, // #### 880 | 0x88, // # # 881 | 0x88, // # # 882 | 0x88, // # # 883 | 0x88, // # # 884 | 0xF0, // #### 885 | 0x00, // 886 | 0x00, // 887 | 888 | /* @770 'c' (4 pixels wide) */ 889 | 0x00, // 890 | 0x00, // 891 | 0x00, // 892 | 0x70, // ### 893 | 0x80, // # 894 | 0x80, // # 895 | 0x80, // # 896 | 0x80, // # 897 | 0x70, // ### 898 | 0x00, // 899 | 0x00, // 900 | 901 | /* @781 'd' (5 pixels wide) */ 902 | 0x08, // # 903 | 0x08, // # 904 | 0x08, // # 905 | 0x78, // #### 906 | 0x88, // # # 907 | 0x88, // # # 908 | 0x88, // # # 909 | 0x88, // # # 910 | 0x78, // #### 911 | 0x00, // 912 | 0x00, // 913 | 914 | /* @792 'e' (5 pixels wide) */ 915 | 0x00, // 916 | 0x00, // 917 | 0x00, // 918 | 0x70, // ### 919 | 0x88, // # # 920 | 0xF8, // ##### 921 | 0x80, // # 922 | 0x88, // # # 923 | 0x70, // ### 924 | 0x00, // 925 | 0x00, // 926 | 927 | /* @803 'f' (3 pixels wide) */ 928 | 0x60, // ## 929 | 0x80, // # 930 | 0x80, // # 931 | 0xE0, // ### 932 | 0x80, // # 933 | 0x80, // # 934 | 0x80, // # 935 | 0x80, // # 936 | 0x80, // # 937 | 0x00, // 938 | 0x00, // 939 | 940 | /* @814 'g' (5 pixels wide) */ 941 | 0x00, // 942 | 0x00, // 943 | 0x00, // 944 | 0x78, // #### 945 | 0x88, // # # 946 | 0x88, // # # 947 | 0x88, // # # 948 | 0x88, // # # 949 | 0x78, // #### 950 | 0x08, // # 951 | 0x70, // ### 952 | 953 | /* @825 'h' (5 pixels wide) */ 954 | 0x80, // # 955 | 0x80, // # 956 | 0x80, // # 957 | 0xF0, // #### 958 | 0x88, // # # 959 | 0x88, // # # 960 | 0x88, // # # 961 | 0x88, // # # 962 | 0x88, // # # 963 | 0x00, // 964 | 0x00, // 965 | 966 | /* @836 'i' (1 pixels wide) */ 967 | 0x00, // 968 | 0x80, // # 969 | 0x00, // 970 | 0x80, // # 971 | 0x80, // # 972 | 0x80, // # 973 | 0x80, // # 974 | 0x80, // # 975 | 0x80, // # 976 | 0x00, // 977 | 0x00, // 978 | 979 | /* @847 'j' (2 pixels wide) */ 980 | 0x00, // 981 | 0x40, // # 982 | 0x00, // 983 | 0xC0, // ## 984 | 0x40, // # 985 | 0x40, // # 986 | 0x40, // # 987 | 0x40, // # 988 | 0x40, // # 989 | 0x40, // # 990 | 0x80, // # 991 | 992 | /* @858 'k' (5 pixels wide) */ 993 | 0x80, // # 994 | 0x80, // # 995 | 0x80, // # 996 | 0x90, // # # 997 | 0xA0, // # # 998 | 0xC0, // ## 999 | 0xA0, // # # 1000 | 0x90, // # # 1001 | 0x88, // # # 1002 | 0x00, // 1003 | 0x00, // 1004 | 1005 | /* @869 'l' (1 pixels wide) */ 1006 | 0x80, // # 1007 | 0x80, // # 1008 | 0x80, // # 1009 | 0x80, // # 1010 | 0x80, // # 1011 | 0x80, // # 1012 | 0x80, // # 1013 | 0x80, // # 1014 | 0x80, // # 1015 | 0x00, // 1016 | 0x00, // 1017 | 1018 | /* @880 'm' (7 pixels wide) */ 1019 | 0x00, // 1020 | 0x00, // 1021 | 0x00, // 1022 | 0xEC, // ### ## 1023 | 0x92, // # # # 1024 | 0x92, // # # # 1025 | 0x92, // # # # 1026 | 0x92, // # # # 1027 | 0x92, // # # # 1028 | 0x00, // 1029 | 0x00, // 1030 | 1031 | /* @891 'n' (5 pixels wide) */ 1032 | 0x00, // 1033 | 0x00, // 1034 | 0x00, // 1035 | 0xF0, // #### 1036 | 0x88, // # # 1037 | 0x88, // # # 1038 | 0x88, // # # 1039 | 0x88, // # # 1040 | 0x88, // # # 1041 | 0x00, // 1042 | 0x00, // 1043 | 1044 | /* @902 'o' (5 pixels wide) */ 1045 | 0x00, // 1046 | 0x00, // 1047 | 0x00, // 1048 | 0x70, // ### 1049 | 0x88, // # # 1050 | 0x88, // # # 1051 | 0x88, // # # 1052 | 0x88, // # # 1053 | 0x70, // ### 1054 | 0x00, // 1055 | 0x00, // 1056 | 1057 | /* @913 'p' (5 pixels wide) */ 1058 | 0x00, // 1059 | 0x00, // 1060 | 0x00, // 1061 | 0xF0, // #### 1062 | 0x88, // # # 1063 | 0x88, // # # 1064 | 0x88, // # # 1065 | 0x88, // # # 1066 | 0xF0, // #### 1067 | 0x80, // # 1068 | 0x80, // # 1069 | 1070 | /* @924 'q' (5 pixels wide) */ 1071 | 0x00, // 1072 | 0x00, // 1073 | 0x00, // 1074 | 0x78, // #### 1075 | 0x88, // # # 1076 | 0x88, // # # 1077 | 0x88, // # # 1078 | 0x88, // # # 1079 | 0x78, // #### 1080 | 0x08, // # 1081 | 0x08, // # 1082 | 1083 | /* @935 'r' (3 pixels wide) */ 1084 | 0x00, // 1085 | 0x00, // 1086 | 0x00, // 1087 | 0xA0, // # # 1088 | 0xC0, // ## 1089 | 0x80, // # 1090 | 0x80, // # 1091 | 0x80, // # 1092 | 0x80, // # 1093 | 0x00, // 1094 | 0x00, // 1095 | 1096 | /* @946 's' (4 pixels wide) */ 1097 | 0x00, // 1098 | 0x00, // 1099 | 0x00, // 1100 | 0x70, // ### 1101 | 0x80, // # 1102 | 0xC0, // ## 1103 | 0x30, // ## 1104 | 0x10, // # 1105 | 0xE0, // ### 1106 | 0x00, // 1107 | 0x00, // 1108 | 1109 | /* @957 't' (3 pixels wide) */ 1110 | 0x00, // 1111 | 0x80, // # 1112 | 0x80, // # 1113 | 0xE0, // ### 1114 | 0x80, // # 1115 | 0x80, // # 1116 | 0x80, // # 1117 | 0x80, // # 1118 | 0x60, // ## 1119 | 0x00, // 1120 | 0x00, // 1121 | 1122 | /* @968 'u' (5 pixels wide) */ 1123 | 0x00, // 1124 | 0x00, // 1125 | 0x00, // 1126 | 0x88, // # # 1127 | 0x88, // # # 1128 | 0x88, // # # 1129 | 0x88, // # # 1130 | 0x88, // # # 1131 | 0x78, // #### 1132 | 0x00, // 1133 | 0x00, // 1134 | 1135 | /* @979 'v' (5 pixels wide) */ 1136 | 0x00, // 1137 | 0x00, // 1138 | 0x00, // 1139 | 0x88, // # # 1140 | 0x88, // # # 1141 | 0x50, // # # 1142 | 0x50, // # # 1143 | 0x20, // # 1144 | 0x20, // # 1145 | 0x00, // 1146 | 0x00, // 1147 | 1148 | /* @990 'w' (7 pixels wide) */ 1149 | 0x00, // 1150 | 0x00, // 1151 | 0x00, // 1152 | 0x92, // # # # 1153 | 0x92, // # # # 1154 | 0xAA, // # # # # 1155 | 0xAA, // # # # # 1156 | 0x44, // # # 1157 | 0x44, // # # 1158 | 0x00, // 1159 | 0x00, // 1160 | 1161 | /* @1001 'x' (5 pixels wide) */ 1162 | 0x00, // 1163 | 0x00, // 1164 | 0x00, // 1165 | 0x88, // # # 1166 | 0x50, // # # 1167 | 0x20, // # 1168 | 0x20, // # 1169 | 0x50, // # # 1170 | 0x88, // # # 1171 | 0x00, // 1172 | 0x00, // 1173 | 1174 | /* @1012 'y' (5 pixels wide) */ 1175 | 0x00, // 1176 | 0x00, // 1177 | 0x00, // 1178 | 0x88, // # # 1179 | 0x88, // # # 1180 | 0x50, // # # 1181 | 0x50, // # # 1182 | 0x20, // # 1183 | 0x20, // # 1184 | 0x40, // # 1185 | 0x40, // # 1186 | 1187 | /* @1023 'z' (4 pixels wide) */ 1188 | 0x00, // 1189 | 0x00, // 1190 | 0x00, // 1191 | 0xF0, // #### 1192 | 0x10, // # 1193 | 0x20, // # 1194 | 0x40, // # 1195 | 0x80, // # 1196 | 0xF0, // #### 1197 | 0x00, // 1198 | 0x00, // 1199 | 1200 | /* @1034 '{' (4 pixels wide) */ 1201 | 0x10, // # 1202 | 0x20, // # 1203 | 0x20, // # 1204 | 0x20, // # 1205 | 0x20, // # 1206 | 0xC0, // ## 1207 | 0x20, // # 1208 | 0x20, // # 1209 | 0x20, // # 1210 | 0x20, // # 1211 | 0x10, // # 1212 | 1213 | /* @1045 '|' (1 pixels wide) */ 1214 | 0x80, // # 1215 | 0x80, // # 1216 | 0x80, // # 1217 | 0x80, // # 1218 | 0x80, // # 1219 | 0x80, // # 1220 | 0x80, // # 1221 | 0x80, // # 1222 | 0x80, // # 1223 | 0x80, // # 1224 | 0x80, // # 1225 | 1226 | /* @1056 '}' (4 pixels wide) */ 1227 | 0x80, // # 1228 | 0x40, // # 1229 | 0x40, // # 1230 | 0x40, // # 1231 | 0x40, // # 1232 | 0x30, // ## 1233 | 0x40, // # 1234 | 0x40, // # 1235 | 0x40, // # 1236 | 0x40, // # 1237 | 0x80, // # 1238 | 1239 | /* @1067 '~' (7 pixels wide) */ 1240 | 0x00, // 1241 | 0x00, // 1242 | 0x00, // 1243 | 0x00, // 1244 | 0x62, // ## # 1245 | 0x92, // # # # 1246 | 0x8C, // # ## 1247 | 0x00, // 1248 | 0x00, // 1249 | 0x00, // 1250 | 0x00, // 1251 | }; 1252 | 1253 | /* Character descriptors for Tahoma 8pt */ 1254 | /* { [Char width in bits], [Offset into tahoma_8ptCharBitmaps in bytes] } */ 1255 | const font_char_desc_t tahoma_descriptors[] = 1256 | { 1257 | {1, 0}, /* */ 1258 | {1, 11}, /* ! */ 1259 | {3, 22}, /* " */ 1260 | {7, 33}, /* # */ 1261 | {5, 44}, /* $ */ 1262 | {10, 55}, /* % */ 1263 | {7, 77}, /* & */ 1264 | {1, 88}, /* ' */ 1265 | {3, 99}, /* ( */ 1266 | {3, 110}, /* ) */ 1267 | {5, 121}, /* * */ 1268 | {7, 132}, /* + */ 1269 | {2, 143}, /* , */ 1270 | {3, 154}, /* - */ 1271 | {1, 165}, /* . */ 1272 | {3, 176}, /* / */ 1273 | {5, 187}, /* 0 */ 1274 | {3, 198}, /* 1 */ 1275 | {5, 209}, /* 2 */ 1276 | {5, 220}, /* 3 */ 1277 | {5, 231}, /* 4 */ 1278 | {5, 242}, /* 5 */ 1279 | {5, 253}, /* 6 */ 1280 | {5, 264}, /* 7 */ 1281 | {5, 275}, /* 8 */ 1282 | {5, 286}, /* 9 */ 1283 | {1, 297}, /* : */ 1284 | {2, 308}, /* ; */ 1285 | {6, 319}, /* < */ 1286 | {7, 330}, /* = */ 1287 | {6, 341}, /* > */ 1288 | {4, 352}, /* ? */ 1289 | {9, 363}, /* @ */ 1290 | {6, 385}, /* A */ 1291 | {5, 396}, /* B */ 1292 | {6, 407}, /* C */ 1293 | {6, 418}, /* D */ 1294 | {5, 429}, /* E */ 1295 | {5, 440}, /* F */ 1296 | {6, 451}, /* G */ 1297 | {6, 462}, /* H */ 1298 | {3, 473}, /* I */ 1299 | {4, 484}, /* J */ 1300 | {5, 495}, /* K */ 1301 | {4, 506}, /* L */ 1302 | {7, 517}, /* M */ 1303 | {6, 528}, /* N */ 1304 | {7, 539}, /* O */ 1305 | {5, 550}, /* P */ 1306 | {7, 561}, /* Q */ 1307 | {6, 572}, /* R */ 1308 | {5, 583}, /* S */ 1309 | {5, 594}, /* T */ 1310 | {6, 605}, /* U */ 1311 | {5, 616}, /* V */ 1312 | {9, 627}, /* W */ 1313 | {5, 649}, /* X */ 1314 | {5, 660}, /* Y */ 1315 | {5, 671}, /* Z */ 1316 | {3, 682}, /* [ */ 1317 | {3, 693}, /* \ */ 1318 | {3, 704}, /* ] */ 1319 | {7, 715}, /* ^ */ 1320 | {6, 726}, /* _ */ 1321 | {2, 737}, /* ` */ 1322 | {5, 748}, /* a */ 1323 | {5, 759}, /* b */ 1324 | {4, 770}, /* c */ 1325 | {5, 781}, /* d */ 1326 | {5, 792}, /* e */ 1327 | {3, 803}, /* f */ 1328 | {5, 814}, /* g */ 1329 | {5, 825}, /* h */ 1330 | {1, 836}, /* i */ 1331 | {2, 847}, /* j */ 1332 | {5, 858}, /* k */ 1333 | {1, 869}, /* l */ 1334 | {7, 880}, /* m */ 1335 | {5, 891}, /* n */ 1336 | {5, 902}, /* o */ 1337 | {5, 913}, /* p */ 1338 | {5, 924}, /* q */ 1339 | {3, 935}, /* r */ 1340 | {4, 946}, /* s */ 1341 | {3, 957}, /* t */ 1342 | {5, 968}, /* u */ 1343 | {5, 979}, /* v */ 1344 | {7, 990}, /* w */ 1345 | {5, 1001}, /* x */ 1346 | {5, 1012}, /* y */ 1347 | {4, 1023}, /* z */ 1348 | {4, 1034}, /* { */ 1349 | {1, 1045}, /* | */ 1350 | {4, 1056}, /* } */ 1351 | {7, 1067}, /* ~ */ 1352 | }; 1353 | 1354 | /* Font information for Tahoma 8pt */ 1355 | const font_info_t tahoma_8pt_font_info = 1356 | { 1357 | 11, /* Character height */ 1358 | 1, /* C */ 1359 | ' ', /* Start character */ 1360 | '~', /* End character */ 1361 | tahoma_descriptors, /* Character descriptor array */ 1362 | tahoma_8pt_bitmaps, /* Character bitmap array */ 1363 | }; 1364 | 1365 | 1366 | -------------------------------------------------------------------------------- /main/font_glcd_5x7.c: -------------------------------------------------------------------------------- 1 | /* * font_glcd_5x7.c 2 | * 3 | * Created on: Jan 5, 2015 4 | * Author: Baoshi 5 | */ 6 | 7 | //#include "esp_common.h" 8 | #include "fonts.h" 9 | 10 | /* Standard ASCII 5x7 font */ 11 | const uint8_t glcd_5x7_bitmaps[] = 12 | { 13 | /* @0 '\x0' (5 pixels wide) */ 14 | 0x00, // 15 | 0x00, // 16 | 0x00, // 17 | 0x00, // 18 | 0x00, // 19 | 0x00, // 20 | 0x00, // 21 | 22 | /* @7 '\x1' (5 pixels wide) */ 23 | 0x70, // ### 24 | 0xF8, // ##### 25 | 0xA8, // # # # 26 | 0xF8, // ##### 27 | 0xD8, // ## ## 28 | 0x88, // # # 29 | 0x70, // ### 30 | 31 | /* @14 '\x2' (5 pixels wide) */ 32 | 0x70, // ### 33 | 0xF8, // ##### 34 | 0xA8, // # # # 35 | 0xF8, // ##### 36 | 0x88, // # # 37 | 0xD8, // ## ## 38 | 0x70, // ### 39 | 40 | /* @21 '\x3' (5 pixels wide) */ 41 | 0x00, // 42 | 0x50, // # # 43 | 0xF8, // ##### 44 | 0xF8, // ##### 45 | 0xF8, // ##### 46 | 0x70, // ### 47 | 0x20, // # 48 | 49 | /* @28 '\x4' (5 pixels wide) */ 50 | 0x00, // 51 | 0x20, // # 52 | 0x70, // ### 53 | 0xF8, // ##### 54 | 0xF8, // ##### 55 | 0x70, // ### 56 | 0x20, // # 57 | 58 | /* @35 '\x5' (5 pixels wide) */ 59 | 0x70, // ### 60 | 0x50, // # # 61 | 0xF8, // ##### 62 | 0xA8, // # # # 63 | 0xF8, // ##### 64 | 0x20, // # 65 | 0x70, // ### 66 | 67 | /* @42 '\x6' (5 pixels wide) */ 68 | 0x20, // # 69 | 0x70, // ### 70 | 0xF8, // ##### 71 | 0xF8, // ##### 72 | 0xF8, // ##### 73 | 0x20, // # 74 | 0x70, // ### 75 | 76 | /* @49 '\x7' (5 pixels wide) */ 77 | 0x00, // 78 | 0x00, // 79 | 0x20, // # 80 | 0x70, // ### 81 | 0x70, // ### 82 | 0x20, // # 83 | 0x00, // 84 | 85 | /* @56 '\x8' (5 pixels wide) */ 86 | 0xF8, // ##### 87 | 0xF8, // ##### 88 | 0xD8, // ## ## 89 | 0x88, // # # 90 | 0x88, // # # 91 | 0xD8, // ## ## 92 | 0xF8, // ##### 93 | 94 | /* @63 '\x9' (5 pixels wide) */ 95 | 0x00, // 96 | 0x00, // 97 | 0x20, // # 98 | 0x50, // # # 99 | 0x50, // # # 100 | 0x20, // # 101 | 0x00, // 102 | 103 | /* @70 '\xA' (5 pixels wide) */ 104 | 0xF8, // ##### 105 | 0xF8, // ##### 106 | 0xD8, // ## ## 107 | 0xA8, // # # # 108 | 0xA8, // # # # 109 | 0xD8, // ## ## 110 | 0xF8, // ##### 111 | 112 | /* @77 '\xB' (5 pixels wide) */ 113 | 0x00, // 114 | 0x38, // ### 115 | 0x18, // ## 116 | 0x68, // ## # 117 | 0xA0, // # # 118 | 0xA0, // # # 119 | 0x40, // # 120 | 121 | /* @84 '\xC' (5 pixels wide) */ 122 | 0x70, // ### 123 | 0x88, // # # 124 | 0x88, // # # 125 | 0x70, // ### 126 | 0x20, // # 127 | 0xF8, // ##### 128 | 0x20, // # 129 | 130 | /* @91 '\xD' (5 pixels wide) */ 131 | 0x78, // #### 132 | 0x48, // # # 133 | 0x78, // #### 134 | 0x40, // # 135 | 0x40, // # 136 | 0x40, // # 137 | 0xC0, // ## 138 | 139 | /* @98 '\xE' (5 pixels wide) */ 140 | 0x78, // #### 141 | 0x48, // # # 142 | 0x78, // #### 143 | 0x48, // # # 144 | 0x48, // # # 145 | 0x58, // # ## 146 | 0xC0, // ## 147 | 148 | /* @105 '\xF' (5 pixels wide) */ 149 | 0x20, // # 150 | 0xA8, // # # # 151 | 0x70, // ### 152 | 0xD8, // ## ## 153 | 0xD8, // ## ## 154 | 0x70, // ### 155 | 0xA8, // # # # 156 | 157 | /* @112 '\x10' (5 pixels wide) */ 158 | 0x80, // # 159 | 0xC0, // ## 160 | 0xF0, // #### 161 | 0xF8, // ##### 162 | 0xF0, // #### 163 | 0xC0, // ## 164 | 0x80, // # 165 | 166 | /* @119 '\x11' (5 pixels wide) */ 167 | 0x08, // # 168 | 0x18, // ## 169 | 0x78, // #### 170 | 0xF8, // ##### 171 | 0x78, // #### 172 | 0x18, // ## 173 | 0x08, // # 174 | 175 | /* @126 '\x12' (5 pixels wide) */ 176 | 0x20, // # 177 | 0x70, // ### 178 | 0xA8, // # # # 179 | 0x20, // # 180 | 0xA8, // # # # 181 | 0x70, // ### 182 | 0x20, // # 183 | 184 | /* @133 '\x13' (5 pixels wide) */ 185 | 0xD8, // ## ## 186 | 0xD8, // ## ## 187 | 0xD8, // ## ## 188 | 0xD8, // ## ## 189 | 0xD8, // ## ## 190 | 0x00, // 191 | 0xD8, // ## ## 192 | 193 | /* @140 '\x14' (5 pixels wide) */ 194 | 0x78, // #### 195 | 0xA8, // # # # 196 | 0xA8, // # # # 197 | 0x68, // ## # 198 | 0x28, // # # 199 | 0x28, // # # 200 | 0x28, // # # 201 | 202 | /* @147 '\x15' (5 pixels wide) */ 203 | 0x30, // ## 204 | 0x48, // # # 205 | 0x50, // # # 206 | 0x28, // # # 207 | 0x10, // # 208 | 0x48, // # # 209 | 0x48, // # # 210 | 211 | /* @154 '\x16' (5 pixels wide) */ 212 | 0x00, // 213 | 0x00, // 214 | 0x00, // 215 | 0x00, // 216 | 0x00, // 217 | 0xF8, // ##### 218 | 0xF8, // ##### 219 | 220 | /* @161 '\x17' (5 pixels wide) */ 221 | 0x20, // # 222 | 0x70, // ### 223 | 0xA8, // # # # 224 | 0x20, // # 225 | 0xA8, // # # # 226 | 0x70, // ### 227 | 0x20, // # 228 | 229 | /* @168 '\x18' (5 pixels wide) */ 230 | 0x00, // 231 | 0x20, // # 232 | 0x70, // ### 233 | 0xA8, // # # # 234 | 0x20, // # 235 | 0x20, // # 236 | 0x20, // # 237 | 238 | /* @175 '\x19' (5 pixels wide) */ 239 | 0x00, // 240 | 0x20, // # 241 | 0x20, // # 242 | 0x20, // # 243 | 0xA8, // # # # 244 | 0x70, // ### 245 | 0x20, // # 246 | 247 | /* @182 '\x1A' (5 pixels wide) */ 248 | 0x00, // 249 | 0x20, // # 250 | 0x10, // # 251 | 0xF8, // ##### 252 | 0x10, // # 253 | 0x20, // # 254 | 0x00, // 255 | 256 | /* @189 '\x1B' (5 pixels wide) */ 257 | 0x00, // 258 | 0x20, // # 259 | 0x40, // # 260 | 0xF8, // ##### 261 | 0x40, // # 262 | 0x20, // # 263 | 0x00, // 264 | 265 | /* @196 '\x1C' (5 pixels wide) */ 266 | 0x00, // 267 | 0x80, // # 268 | 0x80, // # 269 | 0x80, // # 270 | 0xF8, // ##### 271 | 0x00, // 272 | 0x00, // 273 | 274 | /* @203 '\x1D' (5 pixels wide) */ 275 | 0x00, // 276 | 0x50, // # # 277 | 0xF8, // ##### 278 | 0xF8, // ##### 279 | 0x50, // # # 280 | 0x00, // 281 | 0x00, // 282 | 283 | /* @210 '\x1E' (5 pixels wide) */ 284 | 0x00, // 285 | 0x20, // # 286 | 0x20, // # 287 | 0x70, // ### 288 | 0xF8, // ##### 289 | 0xF8, // ##### 290 | 0x00, // 291 | 292 | /* @217 '\x1F' (5 pixels wide) */ 293 | 0x00, // 294 | 0xF8, // ##### 295 | 0xF8, // ##### 296 | 0x70, // ### 297 | 0x20, // # 298 | 0x20, // # 299 | 0x00, // 300 | 301 | /* @224 ' ' (5 pixels wide) */ 302 | 0x00, // 303 | 0x00, // 304 | 0x00, // 305 | 0x00, // 306 | 0x00, // 307 | 0x00, // 308 | 0x00, // 309 | 310 | /* @231 '!' (5 pixels wide) */ 311 | 0x20, // # 312 | 0x20, // # 313 | 0x20, // # 314 | 0x20, // # 315 | 0x20, // # 316 | 0x00, // 317 | 0x20, // # 318 | 319 | /* @238 '"' (5 pixels wide) */ 320 | 0x50, // # # 321 | 0x50, // # # 322 | 0x50, // # # 323 | 0x00, // 324 | 0x00, // 325 | 0x00, // 326 | 0x00, // 327 | 328 | /* @245 '#' (5 pixels wide) */ 329 | 0x50, // # # 330 | 0x50, // # # 331 | 0xF8, // ##### 332 | 0x50, // # # 333 | 0xF8, // ##### 334 | 0x50, // # # 335 | 0x50, // # # 336 | 337 | /* @252 '$' (5 pixels wide) */ 338 | 0x20, // # 339 | 0x78, // #### 340 | 0xA0, // # # 341 | 0x70, // ### 342 | 0x28, // # # 343 | 0xF0, // #### 344 | 0x20, // # 345 | 346 | /* @259 '%' (5 pixels wide) */ 347 | 0xC0, // ## 348 | 0xC8, // ## # 349 | 0x10, // # 350 | 0x20, // # 351 | 0x40, // # 352 | 0x98, // # ## 353 | 0x18, // ## 354 | 355 | /* @266 '&' (5 pixels wide) */ 356 | 0x40, // # 357 | 0xA0, // # # 358 | 0xA0, // # # 359 | 0x40, // # 360 | 0xA8, // # # # 361 | 0x90, // # # 362 | 0x68, // ## # 363 | 364 | /* @273 ''' (5 pixels wide) */ 365 | 0x30, // ## 366 | 0x30, // ## 367 | 0x20, // # 368 | 0x40, // # 369 | 0x00, // 370 | 0x00, // 371 | 0x00, // 372 | 373 | /* @280 '(' (5 pixels wide) */ 374 | 0x10, // # 375 | 0x20, // # 376 | 0x40, // # 377 | 0x40, // # 378 | 0x40, // # 379 | 0x20, // # 380 | 0x10, // # 381 | 382 | /* @287 ')' (5 pixels wide) */ 383 | 0x40, // # 384 | 0x20, // # 385 | 0x10, // # 386 | 0x10, // # 387 | 0x10, // # 388 | 0x20, // # 389 | 0x40, // # 390 | 391 | /* @294 '*' (5 pixels wide) */ 392 | 0x20, // # 393 | 0xA8, // # # # 394 | 0x70, // ### 395 | 0xF8, // ##### 396 | 0x70, // ### 397 | 0xA8, // # # # 398 | 0x20, // # 399 | 400 | /* @301 '+' (5 pixels wide) */ 401 | 0x00, // 402 | 0x20, // # 403 | 0x20, // # 404 | 0xF8, // ##### 405 | 0x20, // # 406 | 0x20, // # 407 | 0x00, // 408 | 409 | /* @308 ',' (5 pixels wide) */ 410 | 0x00, // 411 | 0x00, // 412 | 0x00, // 413 | 0x00, // 414 | 0x30, // ## 415 | 0x30, // ## 416 | 0x20, // # 417 | 418 | /* @315 '-' (5 pixels wide) */ 419 | 0x00, // 420 | 0x00, // 421 | 0x00, // 422 | 0xF8, // ##### 423 | 0x00, // 424 | 0x00, // 425 | 0x00, // 426 | 427 | /* @322 '.' (5 pixels wide) */ 428 | 0x00, // 429 | 0x00, // 430 | 0x00, // 431 | 0x00, // 432 | 0x00, // 433 | 0x30, // ## 434 | 0x30, // ## 435 | 436 | /* @329 '/' (5 pixels wide) */ 437 | 0x00, // 438 | 0x08, // # 439 | 0x10, // # 440 | 0x20, // # 441 | 0x40, // # 442 | 0x80, // # 443 | 0x00, // 444 | 445 | /* @336 '0' (5 pixels wide) */ 446 | 0x70, // ### 447 | 0x88, // # # 448 | 0x98, // # ## 449 | 0xA8, // # # # 450 | 0xC8, // ## # 451 | 0x88, // # # 452 | 0x70, // ### 453 | 454 | /* @343 '1' (5 pixels wide) */ 455 | 0x20, // # 456 | 0x60, // ## 457 | 0x20, // # 458 | 0x20, // # 459 | 0x20, // # 460 | 0x20, // # 461 | 0x70, // ### 462 | 463 | /* @350 '2' (5 pixels wide) */ 464 | 0x70, // ### 465 | 0x88, // # # 466 | 0x08, // # 467 | 0x70, // ### 468 | 0x80, // # 469 | 0x80, // # 470 | 0xF8, // ##### 471 | 472 | /* @357 '3' (5 pixels wide) */ 473 | 0xF8, // ##### 474 | 0x08, // # 475 | 0x10, // # 476 | 0x30, // ## 477 | 0x08, // # 478 | 0x88, // # # 479 | 0x70, // ### 480 | 481 | /* @364 '4' (5 pixels wide) */ 482 | 0x10, // # 483 | 0x30, // ## 484 | 0x50, // # # 485 | 0x90, // # # 486 | 0xF8, // ##### 487 | 0x10, // # 488 | 0x10, // # 489 | 490 | /* @371 '5' (5 pixels wide) */ 491 | 0xF8, // ##### 492 | 0x80, // # 493 | 0xF0, // #### 494 | 0x08, // # 495 | 0x08, // # 496 | 0x88, // # # 497 | 0x70, // ### 498 | 499 | /* @378 '6' (5 pixels wide) */ 500 | 0x38, // ### 501 | 0x40, // # 502 | 0x80, // # 503 | 0xF0, // #### 504 | 0x88, // # # 505 | 0x88, // # # 506 | 0x70, // ### 507 | 508 | /* @385 '7' (5 pixels wide) */ 509 | 0xF8, // ##### 510 | 0x08, // # 511 | 0x08, // # 512 | 0x10, // # 513 | 0x20, // # 514 | 0x40, // # 515 | 0x80, // # 516 | 517 | /* @392 '8' (5 pixels wide) */ 518 | 0x70, // ### 519 | 0x88, // # # 520 | 0x88, // # # 521 | 0x70, // ### 522 | 0x88, // # # 523 | 0x88, // # # 524 | 0x70, // ### 525 | 526 | /* @399 '9' (5 pixels wide) */ 527 | 0x70, // ### 528 | 0x88, // # # 529 | 0x88, // # # 530 | 0x78, // #### 531 | 0x08, // # 532 | 0x10, // # 533 | 0xE0, // ### 534 | 535 | /* @406 ':' (5 pixels wide) */ 536 | 0x00, // 537 | 0x00, // 538 | 0x20, // # 539 | 0x00, // 540 | 0x20, // # 541 | 0x00, // 542 | 0x00, // 543 | 544 | /* @413 ';' (5 pixels wide) */ 545 | 0x00, // 546 | 0x00, // 547 | 0x20, // # 548 | 0x00, // 549 | 0x20, // # 550 | 0x20, // # 551 | 0x40, // # 552 | 553 | /* @420 '<' (5 pixels wide) */ 554 | 0x08, // # 555 | 0x10, // # 556 | 0x20, // # 557 | 0x40, // # 558 | 0x20, // # 559 | 0x10, // # 560 | 0x08, // # 561 | 562 | /* @427 '=' (5 pixels wide) */ 563 | 0x00, // 564 | 0x00, // 565 | 0xF8, // ##### 566 | 0x00, // 567 | 0xF8, // ##### 568 | 0x00, // 569 | 0x00, // 570 | 571 | /* @434 '>' (5 pixels wide) */ 572 | 0x40, // # 573 | 0x20, // # 574 | 0x10, // # 575 | 0x08, // # 576 | 0x10, // # 577 | 0x20, // # 578 | 0x40, // # 579 | 580 | /* @441 '?' (5 pixels wide) */ 581 | 0x70, // ### 582 | 0x88, // # # 583 | 0x08, // # 584 | 0x30, // ## 585 | 0x20, // # 586 | 0x00, // 587 | 0x20, // # 588 | 589 | /* @448 '@' (5 pixels wide) */ 590 | 0x70, // ### 591 | 0x88, // # # 592 | 0xA8, // # # # 593 | 0xB8, // # ### 594 | 0xB0, // # ## 595 | 0x80, // # 596 | 0x78, // #### 597 | 598 | /* @455 'A' (5 pixels wide) */ 599 | 0x20, // # 600 | 0x50, // # # 601 | 0x88, // # # 602 | 0x88, // # # 603 | 0xF8, // ##### 604 | 0x88, // # # 605 | 0x88, // # # 606 | 607 | /* @462 'B' (5 pixels wide) */ 608 | 0xF0, // #### 609 | 0x88, // # # 610 | 0x88, // # # 611 | 0xF0, // #### 612 | 0x88, // # # 613 | 0x88, // # # 614 | 0xF0, // #### 615 | 616 | /* @469 'C' (5 pixels wide) */ 617 | 0x70, // ### 618 | 0x88, // # # 619 | 0x80, // # 620 | 0x80, // # 621 | 0x80, // # 622 | 0x88, // # # 623 | 0x70, // ### 624 | 625 | /* @476 'D' (5 pixels wide) */ 626 | 0xF0, // #### 627 | 0x88, // # # 628 | 0x88, // # # 629 | 0x88, // # # 630 | 0x88, // # # 631 | 0x88, // # # 632 | 0xF0, // #### 633 | 634 | /* @483 'E' (5 pixels wide) */ 635 | 0xF8, // ##### 636 | 0x80, // # 637 | 0x80, // # 638 | 0xF0, // #### 639 | 0x80, // # 640 | 0x80, // # 641 | 0xF8, // ##### 642 | 643 | /* @490 'F' (5 pixels wide) */ 644 | 0xF8, // ##### 645 | 0x80, // # 646 | 0x80, // # 647 | 0xF0, // #### 648 | 0x80, // # 649 | 0x80, // # 650 | 0x80, // # 651 | 652 | /* @497 'G' (5 pixels wide) */ 653 | 0x78, // #### 654 | 0x88, // # # 655 | 0x80, // # 656 | 0x80, // # 657 | 0x98, // # ## 658 | 0x88, // # # 659 | 0x78, // #### 660 | 661 | /* @504 'H' (5 pixels wide) */ 662 | 0x88, // # # 663 | 0x88, // # # 664 | 0x88, // # # 665 | 0xF8, // ##### 666 | 0x88, // # # 667 | 0x88, // # # 668 | 0x88, // # # 669 | 670 | /* @511 'I' (5 pixels wide) */ 671 | 0x70, // ### 672 | 0x20, // # 673 | 0x20, // # 674 | 0x20, // # 675 | 0x20, // # 676 | 0x20, // # 677 | 0x70, // ### 678 | 679 | /* @518 'J' (5 pixels wide) */ 680 | 0x38, // ### 681 | 0x10, // # 682 | 0x10, // # 683 | 0x10, // # 684 | 0x10, // # 685 | 0x90, // # # 686 | 0x60, // ## 687 | 688 | /* @525 'K' (5 pixels wide) */ 689 | 0x88, // # # 690 | 0x90, // # # 691 | 0xA0, // # # 692 | 0xC0, // ## 693 | 0xA0, // # # 694 | 0x90, // # # 695 | 0x88, // # # 696 | 697 | /* @532 'L' (5 pixels wide) */ 698 | 0x80, // # 699 | 0x80, // # 700 | 0x80, // # 701 | 0x80, // # 702 | 0x80, // # 703 | 0x80, // # 704 | 0xF8, // ##### 705 | 706 | /* @539 'M' (5 pixels wide) */ 707 | 0x88, // # # 708 | 0xD8, // ## ## 709 | 0xA8, // # # # 710 | 0xA8, // # # # 711 | 0xA8, // # # # 712 | 0x88, // # # 713 | 0x88, // # # 714 | 715 | /* @546 'N' (5 pixels wide) */ 716 | 0x88, // # # 717 | 0x88, // # # 718 | 0xC8, // ## # 719 | 0xA8, // # # # 720 | 0x98, // # ## 721 | 0x88, // # # 722 | 0x88, // # # 723 | 724 | /* @553 'O' (5 pixels wide) */ 725 | 0x70, // ### 726 | 0x88, // # # 727 | 0x88, // # # 728 | 0x88, // # # 729 | 0x88, // # # 730 | 0x88, // # # 731 | 0x70, // ### 732 | 733 | /* @560 'P' (5 pixels wide) */ 734 | 0xF0, // #### 735 | 0x88, // # # 736 | 0x88, // # # 737 | 0xF0, // #### 738 | 0x80, // # 739 | 0x80, // # 740 | 0x80, // # 741 | 742 | /* @567 'Q' (5 pixels wide) */ 743 | 0x70, // ### 744 | 0x88, // # # 745 | 0x88, // # # 746 | 0x88, // # # 747 | 0xA8, // # # # 748 | 0x90, // # # 749 | 0x68, // ## # 750 | 751 | /* @574 'R' (5 pixels wide) */ 752 | 0xF0, // #### 753 | 0x88, // # # 754 | 0x88, // # # 755 | 0xF0, // #### 756 | 0xA0, // # # 757 | 0x90, // # # 758 | 0x88, // # # 759 | 760 | /* @581 'S' (5 pixels wide) */ 761 | 0x70, // ### 762 | 0x88, // # # 763 | 0x80, // # 764 | 0x70, // ### 765 | 0x08, // # 766 | 0x88, // # # 767 | 0x70, // ### 768 | 769 | /* @588 'T' (5 pixels wide) */ 770 | 0xF8, // ##### 771 | 0xA8, // # # # 772 | 0x20, // # 773 | 0x20, // # 774 | 0x20, // # 775 | 0x20, // # 776 | 0x20, // # 777 | 778 | /* @595 'U' (5 pixels wide) */ 779 | 0x88, // # # 780 | 0x88, // # # 781 | 0x88, // # # 782 | 0x88, // # # 783 | 0x88, // # # 784 | 0x88, // # # 785 | 0x70, // ### 786 | 787 | /* @602 'V' (5 pixels wide) */ 788 | 0x88, // # # 789 | 0x88, // # # 790 | 0x88, // # # 791 | 0x88, // # # 792 | 0x88, // # # 793 | 0x50, // # # 794 | 0x20, // # 795 | 796 | /* @609 'W' (5 pixels wide) */ 797 | 0x88, // # # 798 | 0x88, // # # 799 | 0x88, // # # 800 | 0xA8, // # # # 801 | 0xA8, // # # # 802 | 0xA8, // # # # 803 | 0x50, // # # 804 | 805 | /* @616 'X' (5 pixels wide) */ 806 | 0x88, // # # 807 | 0x88, // # # 808 | 0x50, // # # 809 | 0x20, // # 810 | 0x50, // # # 811 | 0x88, // # # 812 | 0x88, // # # 813 | 814 | /* @623 'Y' (5 pixels wide) */ 815 | 0x88, // # # 816 | 0x88, // # # 817 | 0x50, // # # 818 | 0x20, // # 819 | 0x20, // # 820 | 0x20, // # 821 | 0x20, // # 822 | 823 | /* @630 'Z' (5 pixels wide) */ 824 | 0xF8, // ##### 825 | 0x08, // # 826 | 0x10, // # 827 | 0x70, // ### 828 | 0x40, // # 829 | 0x80, // # 830 | 0xF8, // ##### 831 | 832 | /* @637 '[' (5 pixels wide) */ 833 | 0x78, // #### 834 | 0x40, // # 835 | 0x40, // # 836 | 0x40, // # 837 | 0x40, // # 838 | 0x40, // # 839 | 0x78, // #### 840 | 841 | /* @644 '\' (5 pixels wide) */ 842 | 0x00, // 843 | 0x80, // # 844 | 0x40, // # 845 | 0x20, // # 846 | 0x10, // # 847 | 0x08, // # 848 | 0x00, // 849 | 850 | /* @651 ']' (5 pixels wide) */ 851 | 0x78, // #### 852 | 0x08, // # 853 | 0x08, // # 854 | 0x08, // # 855 | 0x08, // # 856 | 0x08, // # 857 | 0x78, // #### 858 | 859 | /* @658 '^' (5 pixels wide) */ 860 | 0x20, // # 861 | 0x50, // # # 862 | 0x88, // # # 863 | 0x00, // 864 | 0x00, // 865 | 0x00, // 866 | 0x00, // 867 | 868 | /* @665 '_' (5 pixels wide) */ 869 | 0x00, // 870 | 0x00, // 871 | 0x00, // 872 | 0x00, // 873 | 0x00, // 874 | 0x00, // 875 | 0xF8, // ##### 876 | 877 | /* @672 '`' (5 pixels wide) */ 878 | 0x60, // ## 879 | 0x60, // ## 880 | 0x20, // # 881 | 0x10, // # 882 | 0x00, // 883 | 0x00, // 884 | 0x00, // 885 | 886 | /* @679 'a' (5 pixels wide) */ 887 | 0x00, // 888 | 0x00, // 889 | 0x60, // ## 890 | 0x10, // # 891 | 0x70, // ### 892 | 0x90, // # # 893 | 0x78, // #### 894 | 895 | /* @686 'b' (5 pixels wide) */ 896 | 0x80, // # 897 | 0x80, // # 898 | 0xB0, // # ## 899 | 0xC8, // ## # 900 | 0x88, // # # 901 | 0xC8, // ## # 902 | 0xB0, // # ## 903 | 904 | /* @693 'c' (5 pixels wide) */ 905 | 0x00, // 906 | 0x00, // 907 | 0x70, // ### 908 | 0x88, // # # 909 | 0x80, // # 910 | 0x88, // # # 911 | 0x70, // ### 912 | 913 | /* @700 'd' (5 pixels wide) */ 914 | 0x08, // # 915 | 0x08, // # 916 | 0x68, // ## # 917 | 0x98, // # ## 918 | 0x88, // # # 919 | 0x98, // # ## 920 | 0x68, // ## # 921 | 922 | /* @707 'e' (5 pixels wide) */ 923 | 0x00, // 924 | 0x00, // 925 | 0x70, // ### 926 | 0x88, // # # 927 | 0xF8, // ##### 928 | 0x80, // # 929 | 0x70, // ### 930 | 931 | /* @714 'f' (5 pixels wide) */ 932 | 0x10, // # 933 | 0x28, // # # 934 | 0x20, // # 935 | 0x70, // ### 936 | 0x20, // # 937 | 0x20, // # 938 | 0x20, // # 939 | 940 | /* @721 'g' (5 pixels wide) */ 941 | 0x00, // 942 | 0x00, // 943 | 0x70, // ### 944 | 0x98, // # ## 945 | 0x98, // # ## 946 | 0x68, // ## # 947 | 0x08, // # 948 | 949 | /* @728 'h' (5 pixels wide) */ 950 | 0x80, // # 951 | 0x80, // # 952 | 0xB0, // # ## 953 | 0xC8, // ## # 954 | 0x88, // # # 955 | 0x88, // # # 956 | 0x88, // # # 957 | 958 | /* @735 'i' (5 pixels wide) */ 959 | 0x20, // # 960 | 0x00, // 961 | 0x60, // ## 962 | 0x20, // # 963 | 0x20, // # 964 | 0x20, // # 965 | 0x70, // ### 966 | 967 | /* @742 'j' (5 pixels wide) */ 968 | 0x10, // # 969 | 0x00, // 970 | 0x10, // # 971 | 0x10, // # 972 | 0x10, // # 973 | 0x90, // # # 974 | 0x60, // ## 975 | 976 | /* @749 'k' (5 pixels wide) */ 977 | 0x80, // # 978 | 0x80, // # 979 | 0x90, // # # 980 | 0xA0, // # # 981 | 0xC0, // ## 982 | 0xA0, // # # 983 | 0x90, // # # 984 | 985 | /* @756 'l' (5 pixels wide) */ 986 | 0x60, // ## 987 | 0x20, // # 988 | 0x20, // # 989 | 0x20, // # 990 | 0x20, // # 991 | 0x20, // # 992 | 0x70, // ### 993 | 994 | /* @763 'm' (5 pixels wide) */ 995 | 0x00, // 996 | 0x00, // 997 | 0xD0, // ## # 998 | 0xA8, // # # # 999 | 0xA8, // # # # 1000 | 0xA8, // # # # 1001 | 0xA8, // # # # 1002 | 1003 | /* @770 'n' (5 pixels wide) */ 1004 | 0x00, // 1005 | 0x00, // 1006 | 0xB0, // # ## 1007 | 0xC8, // ## # 1008 | 0x88, // # # 1009 | 0x88, // # # 1010 | 0x88, // # # 1011 | 1012 | /* @777 'o' (5 pixels wide) */ 1013 | 0x00, // 1014 | 0x00, // 1015 | 0x70, // ### 1016 | 0x88, // # # 1017 | 0x88, // # # 1018 | 0x88, // # # 1019 | 0x70, // ### 1020 | 1021 | /* @784 'p' (5 pixels wide) */ 1022 | 0x00, // 1023 | 0x00, // 1024 | 0xB0, // # ## 1025 | 0xC8, // ## # 1026 | 0xC8, // ## # 1027 | 0xB0, // # ## 1028 | 0x80, // # 1029 | 1030 | /* @791 'q' (5 pixels wide) */ 1031 | 0x00, // 1032 | 0x00, // 1033 | 0x68, // ## # 1034 | 0x98, // # ## 1035 | 0x98, // # ## 1036 | 0x68, // ## # 1037 | 0x08, // # 1038 | 1039 | /* @798 'r' (5 pixels wide) */ 1040 | 0x00, // 1041 | 0x00, // 1042 | 0xB0, // # ## 1043 | 0xC8, // ## # 1044 | 0x80, // # 1045 | 0x80, // # 1046 | 0x80, // # 1047 | 1048 | /* @805 's' (5 pixels wide) */ 1049 | 0x00, // 1050 | 0x00, // 1051 | 0x78, // #### 1052 | 0x80, // # 1053 | 0x70, // ### 1054 | 0x08, // # 1055 | 0xF0, // #### 1056 | 1057 | /* @812 't' (5 pixels wide) */ 1058 | 0x20, // # 1059 | 0x20, // # 1060 | 0xF8, // ##### 1061 | 0x20, // # 1062 | 0x20, // # 1063 | 0x28, // # # 1064 | 0x10, // # 1065 | 1066 | /* @819 'u' (5 pixels wide) */ 1067 | 0x00, // 1068 | 0x00, // 1069 | 0x88, // # # 1070 | 0x88, // # # 1071 | 0x88, // # # 1072 | 0x98, // # ## 1073 | 0x68, // ## # 1074 | 1075 | /* @826 'v' (5 pixels wide) */ 1076 | 0x00, // 1077 | 0x00, // 1078 | 0x88, // # # 1079 | 0x88, // # # 1080 | 0x88, // # # 1081 | 0x50, // # # 1082 | 0x20, // # 1083 | 1084 | /* @833 'w' (5 pixels wide) */ 1085 | 0x00, // 1086 | 0x00, // 1087 | 0x88, // # # 1088 | 0x88, // # # 1089 | 0xA8, // # # # 1090 | 0xA8, // # # # 1091 | 0x50, // # # 1092 | 1093 | /* @840 'x' (5 pixels wide) */ 1094 | 0x00, // 1095 | 0x00, // 1096 | 0x88, // # # 1097 | 0x50, // # # 1098 | 0x20, // # 1099 | 0x50, // # # 1100 | 0x88, // # # 1101 | 1102 | /* @847 'y' (5 pixels wide) */ 1103 | 0x00, // 1104 | 0x00, // 1105 | 0x88, // # # 1106 | 0x88, // # # 1107 | 0x78, // #### 1108 | 0x08, // # 1109 | 0x88, // # # 1110 | 1111 | /* @854 'z' (5 pixels wide) */ 1112 | 0x00, // 1113 | 0x00, // 1114 | 0xF8, // ##### 1115 | 0x10, // # 1116 | 0x20, // # 1117 | 0x40, // # 1118 | 0xF8, // ##### 1119 | 1120 | /* @861 '{' (5 pixels wide) */ 1121 | 0x10, // # 1122 | 0x20, // # 1123 | 0x20, // # 1124 | 0x40, // # 1125 | 0x20, // # 1126 | 0x20, // # 1127 | 0x10, // # 1128 | 1129 | /* @868 '|' (5 pixels wide) */ 1130 | 0x20, // # 1131 | 0x20, // # 1132 | 0x20, // # 1133 | 0x00, // 1134 | 0x20, // # 1135 | 0x20, // # 1136 | 0x20, // # 1137 | 1138 | /* @875 '}' (5 pixels wide) */ 1139 | 0x40, // # 1140 | 0x20, // # 1141 | 0x20, // # 1142 | 0x10, // # 1143 | 0x20, // # 1144 | 0x20, // # 1145 | 0x40, // # 1146 | 1147 | /* @882 '~' (5 pixels wide) */ 1148 | 0x40, // # 1149 | 0xA8, // # # # 1150 | 0x10, // # 1151 | 0x00, // 1152 | 0x00, // 1153 | 0x00, // 1154 | 0x00, // 1155 | 1156 | /* @889 '\x7F' (5 pixels wide) */ 1157 | 0x20, // # 1158 | 0x70, // ### 1159 | 0xD8, // ## ## 1160 | 0x88, // # # 1161 | 0x88, // # # 1162 | 0xF8, // ##### 1163 | 0x00, // 1164 | 1165 | /* @896 '\x80' (5 pixels wide) */ 1166 | 0x70, // ### 1167 | 0x88, // # # 1168 | 0x80, // # 1169 | 0x80, // # 1170 | 0x88, // # # 1171 | 0x70, // ### 1172 | 0x10, // # 1173 | 1174 | /* @903 '\x81' (5 pixels wide) */ 1175 | 0x00, // 1176 | 0x88, // # # 1177 | 0x00, // 1178 | 0x88, // # # 1179 | 0x88, // # # 1180 | 0x98, // # ## 1181 | 0x68, // ## # 1182 | 1183 | /* @910 '\x82' (5 pixels wide) */ 1184 | 0x18, // ## 1185 | 0x00, // 1186 | 0x70, // ### 1187 | 0x88, // # # 1188 | 0xF8, // ##### 1189 | 0x80, // # 1190 | 0x78, // #### 1191 | 1192 | /* @917 '\x83' (5 pixels wide) */ 1193 | 0xF8, // ##### 1194 | 0x00, // 1195 | 0x60, // ## 1196 | 0x10, // # 1197 | 0x70, // ### 1198 | 0x90, // # # 1199 | 0x78, // #### 1200 | 1201 | /* @924 '\x84' (5 pixels wide) */ 1202 | 0x00, // 1203 | 0x88, // # # 1204 | 0x60, // ## 1205 | 0x10, // # 1206 | 0x70, // ### 1207 | 0x90, // # # 1208 | 0x78, // #### 1209 | 1210 | /* @931 '\x85' (5 pixels wide) */ 1211 | 0xC0, // ## 1212 | 0x00, // 1213 | 0x60, // ## 1214 | 0x10, // # 1215 | 0x70, // ### 1216 | 0x90, // # # 1217 | 0x78, // #### 1218 | 1219 | /* @938 '\x86' (5 pixels wide) */ 1220 | 0x30, // ## 1221 | 0x00, // 1222 | 0x60, // ## 1223 | 0x10, // # 1224 | 0x70, // ### 1225 | 0x90, // # # 1226 | 0x78, // #### 1227 | 1228 | /* @945 '\x87' (5 pixels wide) */ 1229 | 0x00, // 1230 | 0x78, // #### 1231 | 0xC0, // ## 1232 | 0xC0, // ## 1233 | 0x78, // #### 1234 | 0x10, // # 1235 | 0x30, // ## 1236 | 1237 | /* @952 '\x88' (5 pixels wide) */ 1238 | 0xF8, // ##### 1239 | 0x00, // 1240 | 0x70, // ### 1241 | 0x88, // # # 1242 | 0xF8, // ##### 1243 | 0x80, // # 1244 | 0x78, // #### 1245 | 1246 | /* @959 '\x89' (5 pixels wide) */ 1247 | 0x88, // # # 1248 | 0x00, // 1249 | 0x70, // ### 1250 | 0x88, // # # 1251 | 0xF8, // ##### 1252 | 0x80, // # 1253 | 0x78, // #### 1254 | 1255 | /* @966 '\x8A' (5 pixels wide) */ 1256 | 0xC0, // ## 1257 | 0x00, // 1258 | 0x70, // ### 1259 | 0x88, // # # 1260 | 0xF8, // ##### 1261 | 0x80, // # 1262 | 0x78, // #### 1263 | 1264 | /* @973 '\x8B' (5 pixels wide) */ 1265 | 0x28, // # # 1266 | 0x00, // 1267 | 0x30, // ## 1268 | 0x10, // # 1269 | 0x10, // # 1270 | 0x10, // # 1271 | 0x38, // ### 1272 | 1273 | /* @980 '\x8C' (5 pixels wide) */ 1274 | 0x30, // ## 1275 | 0x48, // # # 1276 | 0x30, // ## 1277 | 0x10, // # 1278 | 0x10, // # 1279 | 0x10, // # 1280 | 0x38, // ### 1281 | 1282 | /* @987 '\x8D' (5 pixels wide) */ 1283 | 0x60, // ## 1284 | 0x00, // 1285 | 0x30, // ## 1286 | 0x10, // # 1287 | 0x10, // # 1288 | 0x10, // # 1289 | 0x38, // ### 1290 | 1291 | /* @994 '\x8E' (5 pixels wide) */ 1292 | 0xA8, // # # # 1293 | 0x50, // # # 1294 | 0x88, // # # 1295 | 0x88, // # # 1296 | 0xF8, // ##### 1297 | 0x88, // # # 1298 | 0x88, // # # 1299 | 1300 | /* @1001 '\x8F' (5 pixels wide) */ 1301 | 0x20, // # 1302 | 0x00, // 1303 | 0x20, // # 1304 | 0x50, // # # 1305 | 0x88, // # # 1306 | 0xF8, // ##### 1307 | 0x88, // # # 1308 | 1309 | /* @1008 '\x90' (5 pixels wide) */ 1310 | 0x30, // ## 1311 | 0x00, // 1312 | 0xF0, // #### 1313 | 0x80, // # 1314 | 0xE0, // ### 1315 | 0x80, // # 1316 | 0xF0, // #### 1317 | 1318 | /* @1015 '\x91' (5 pixels wide) */ 1319 | 0x00, // 1320 | 0x00, // 1321 | 0x78, // #### 1322 | 0x10, // # 1323 | 0x78, // #### 1324 | 0x90, // # # 1325 | 0x78, // #### 1326 | 1327 | /* @1022 '\x92' (5 pixels wide) */ 1328 | 0x38, // ### 1329 | 0x50, // # # 1330 | 0x90, // # # 1331 | 0xF8, // ##### 1332 | 0x90, // # # 1333 | 0x90, // # # 1334 | 0x98, // # ## 1335 | 1336 | /* @1029 '\x93' (5 pixels wide) */ 1337 | 0x70, // ### 1338 | 0x88, // # # 1339 | 0x00, // 1340 | 0x70, // ### 1341 | 0x88, // # # 1342 | 0x88, // # # 1343 | 0x70, // ### 1344 | 1345 | /* @1036 '\x94' (5 pixels wide) */ 1346 | 0x00, // 1347 | 0x88, // # # 1348 | 0x70, // ### 1349 | 0x88, // # # 1350 | 0x88, // # # 1351 | 0x88, // # # 1352 | 0x70, // ### 1353 | 1354 | /* @1043 '\x95' (5 pixels wide) */ 1355 | 0x00, // 1356 | 0xC0, // ## 1357 | 0x00, // 1358 | 0x70, // ### 1359 | 0x88, // # # 1360 | 0x88, // # # 1361 | 0x70, // ### 1362 | 1363 | /* @1050 '\x96' (5 pixels wide) */ 1364 | 0x70, // ### 1365 | 0x88, // # # 1366 | 0x00, // 1367 | 0x88, // # # 1368 | 0x88, // # # 1369 | 0x98, // # ## 1370 | 0x68, // ## # 1371 | 1372 | /* @1057 '\x97' (5 pixels wide) */ 1373 | 0x00, // 1374 | 0xC0, // ## 1375 | 0x00, // 1376 | 0x88, // # # 1377 | 0x88, // # # 1378 | 0x98, // # ## 1379 | 0x68, // ## # 1380 | 1381 | /* @1064 '\x98' (5 pixels wide) */ 1382 | 0x48, // # # 1383 | 0x00, // 1384 | 0x48, // # # 1385 | 0x48, // # # 1386 | 0x48, // # # 1387 | 0x38, // ### 1388 | 0x08, // # 1389 | 1390 | /* @1071 '\x99' (5 pixels wide) */ 1391 | 0x88, // # # 1392 | 0x70, // ### 1393 | 0x88, // # # 1394 | 0x88, // # # 1395 | 0x88, // # # 1396 | 0x88, // # # 1397 | 0x70, // ### 1398 | 1399 | /* @1078 '\x9A' (5 pixels wide) */ 1400 | 0x88, // # # 1401 | 0x00, // 1402 | 0x88, // # # 1403 | 0x88, // # # 1404 | 0x88, // # # 1405 | 0x88, // # # 1406 | 0x70, // ### 1407 | 1408 | /* @1085 '\x9B' (5 pixels wide) */ 1409 | 0x20, // # 1410 | 0x20, // # 1411 | 0xF8, // ##### 1412 | 0xA0, // # # 1413 | 0xA0, // # # 1414 | 0xF8, // ##### 1415 | 0x20, // # 1416 | 1417 | /* @1092 '\x9C' (5 pixels wide) */ 1418 | 0x30, // ## 1419 | 0x58, // # ## 1420 | 0x48, // # # 1421 | 0xE0, // ### 1422 | 0x40, // # 1423 | 0x48, // # # 1424 | 0xF8, // ##### 1425 | 1426 | /* @1099 '\x9D' (5 pixels wide) */ 1427 | 0xD8, // ## ## 1428 | 0xD8, // ## ## 1429 | 0x70, // ### 1430 | 0xF8, // ##### 1431 | 0x20, // # 1432 | 0xF8, // ##### 1433 | 0x20, // # 1434 | 1435 | /* @1106 '\x9E' (5 pixels wide) */ 1436 | 0xE0, // ### 1437 | 0x90, // # # 1438 | 0x90, // # # 1439 | 0xE0, // ### 1440 | 0x90, // # # 1441 | 0xB8, // # ### 1442 | 0x90, // # # 1443 | 1444 | /* @1113 '\x9F' (5 pixels wide) */ 1445 | 0x18, // ## 1446 | 0x28, // # # 1447 | 0x20, // # 1448 | 0x70, // ### 1449 | 0x20, // # 1450 | 0x20, // # 1451 | 0xA0, // # # 1452 | 1453 | /* @1120 '\xA0' (5 pixels wide) */ 1454 | 0x18, // ## 1455 | 0x00, // 1456 | 0x60, // ## 1457 | 0x10, // # 1458 | 0x70, // ### 1459 | 0x90, // # # 1460 | 0x78, // #### 1461 | 1462 | /* @1127 '\xA1' (5 pixels wide) */ 1463 | 0x18, // ## 1464 | 0x00, // 1465 | 0x30, // ## 1466 | 0x10, // # 1467 | 0x10, // # 1468 | 0x10, // # 1469 | 0x38, // ### 1470 | 1471 | /* @1134 '\xA2' (5 pixels wide) */ 1472 | 0x00, // 1473 | 0x18, // ## 1474 | 0x00, // 1475 | 0x70, // ### 1476 | 0x88, // # # 1477 | 0x88, // # # 1478 | 0x70, // ### 1479 | 1480 | /* @1141 '\xA3' (5 pixels wide) */ 1481 | 0x00, // 1482 | 0x18, // ## 1483 | 0x00, // 1484 | 0x88, // # # 1485 | 0x88, // # # 1486 | 0x98, // # ## 1487 | 0x68, // ## # 1488 | 1489 | /* @1148 '\xA4' (5 pixels wide) */ 1490 | 0x00, // 1491 | 0x78, // #### 1492 | 0x00, // 1493 | 0x70, // ### 1494 | 0x48, // # # 1495 | 0x48, // # # 1496 | 0x48, // # # 1497 | 1498 | /* @1155 '\xA5' (5 pixels wide) */ 1499 | 0xF8, // ##### 1500 | 0x00, // 1501 | 0xC8, // ## # 1502 | 0xE8, // ### # 1503 | 0xB8, // # ### 1504 | 0x98, // # ## 1505 | 0x88, // # # 1506 | 1507 | /* @1162 '\xA6' (5 pixels wide) */ 1508 | 0x70, // ### 1509 | 0x90, // # # 1510 | 0x90, // # # 1511 | 0x78, // #### 1512 | 0x00, // 1513 | 0xF8, // ##### 1514 | 0x00, // 1515 | 1516 | /* @1169 '\xA7' (5 pixels wide) */ 1517 | 0x70, // ### 1518 | 0x88, // # # 1519 | 0x88, // # # 1520 | 0x70, // ### 1521 | 0x00, // 1522 | 0xF8, // ##### 1523 | 0x00, // 1524 | 1525 | /* @1176 '\xA8' (5 pixels wide) */ 1526 | 0x20, // # 1527 | 0x00, // 1528 | 0x20, // # 1529 | 0x60, // ## 1530 | 0x80, // # 1531 | 0x88, // # # 1532 | 0x70, // ### 1533 | 1534 | /* @1183 '\xA9' (5 pixels wide) */ 1535 | 0x00, // 1536 | 0x00, // 1537 | 0x00, // 1538 | 0xF8, // ##### 1539 | 0x80, // # 1540 | 0x80, // # 1541 | 0x00, // 1542 | 1543 | /* @1190 '\xAA' (5 pixels wide) */ 1544 | 0x00, // 1545 | 0x00, // 1546 | 0x00, // 1547 | 0xF8, // ##### 1548 | 0x08, // # 1549 | 0x08, // # 1550 | 0x00, // 1551 | 1552 | /* @1197 '\xAB' (5 pixels wide) */ 1553 | 0x80, // # 1554 | 0x88, // # # 1555 | 0x90, // # # 1556 | 0xB8, // # ### 1557 | 0x48, // # # 1558 | 0x98, // # ## 1559 | 0x20, // # 1560 | 1561 | /* @1204 '\xAC' (5 pixels wide) */ 1562 | 0x80, // # 1563 | 0x88, // # # 1564 | 0x90, // # # 1565 | 0xA8, // # # # 1566 | 0x58, // # ## 1567 | 0xB8, // # ### 1568 | 0x08, // # 1569 | 1570 | /* @1211 '\xAD' (5 pixels wide) */ 1571 | 0x20, // # 1572 | 0x20, // # 1573 | 0x00, // 1574 | 0x20, // # 1575 | 0x20, // # 1576 | 0x20, // # 1577 | 0x20, // # 1578 | 1579 | /* @1218 '\xAE' (5 pixels wide) */ 1580 | 0x00, // 1581 | 0x28, // # # 1582 | 0x50, // # # 1583 | 0xA0, // # # 1584 | 0x50, // # # 1585 | 0x28, // # # 1586 | 0x00, // 1587 | 1588 | /* @1225 '\xAF' (5 pixels wide) */ 1589 | 0x00, // 1590 | 0xA0, // # # 1591 | 0x50, // # # 1592 | 0x28, // # # 1593 | 0x50, // # # 1594 | 0xA0, // # # 1595 | 0x00, // 1596 | 1597 | /* @1232 '\xB0' (5 pixels wide) */ 1598 | 0x20, // # 1599 | 0x88, // # # 1600 | 0x20, // # 1601 | 0x88, // # # 1602 | 0x20, // # 1603 | 0x88, // # # 1604 | 0x20, // # 1605 | 1606 | /* @1239 '\xB1' (5 pixels wide) */ 1607 | 0x50, // # # 1608 | 0xA8, // # # # 1609 | 0x50, // # # 1610 | 0xA8, // # # # 1611 | 0x50, // # # 1612 | 0xA8, // # # # 1613 | 0x50, // # # 1614 | 1615 | /* @1246 '\xB2' (5 pixels wide) */ 1616 | 0x10, // # 1617 | 0x10, // # 1618 | 0x10, // # 1619 | 0x10, // # 1620 | 0x10, // # 1621 | 0x10, // # 1622 | 0x10, // # 1623 | 1624 | /* @1253 '\xB3' (5 pixels wide) */ 1625 | 0x10, // # 1626 | 0x10, // # 1627 | 0x10, // # 1628 | 0x10, // # 1629 | 0xF0, // #### 1630 | 0x10, // # 1631 | 0x10, // # 1632 | 1633 | /* @1260 '\xB4' (5 pixels wide) */ 1634 | 0x10, // # 1635 | 0x10, // # 1636 | 0xF0, // #### 1637 | 0x10, // # 1638 | 0xF0, // #### 1639 | 0x10, // # 1640 | 0x10, // # 1641 | 1642 | /* @1267 '\xB5' (5 pixels wide) */ 1643 | 0x28, // # # 1644 | 0x28, // # # 1645 | 0x28, // # # 1646 | 0x28, // # # 1647 | 0xE8, // ### # 1648 | 0x28, // # # 1649 | 0x28, // # # 1650 | 1651 | /* @1274 '\xB6' (5 pixels wide) */ 1652 | 0x00, // 1653 | 0x00, // 1654 | 0x00, // 1655 | 0x00, // 1656 | 0xF8, // ##### 1657 | 0x28, // # # 1658 | 0x28, // # # 1659 | 1660 | /* @1281 '\xB7' (5 pixels wide) */ 1661 | 0x00, // 1662 | 0x00, // 1663 | 0xF0, // #### 1664 | 0x10, // # 1665 | 0xF0, // #### 1666 | 0x10, // # 1667 | 0x10, // # 1668 | 1669 | /* @1288 '\xB8' (5 pixels wide) */ 1670 | 0x28, // # # 1671 | 0x28, // # # 1672 | 0xE8, // ### # 1673 | 0x08, // # 1674 | 0xE8, // ### # 1675 | 0x28, // # # 1676 | 0x28, // # # 1677 | 1678 | /* @1295 '\xB9' (5 pixels wide) */ 1679 | 0x28, // # # 1680 | 0x28, // # # 1681 | 0x28, // # # 1682 | 0x28, // # # 1683 | 0x28, // # # 1684 | 0x28, // # # 1685 | 0x28, // # # 1686 | 1687 | /* @1302 '\xBA' (5 pixels wide) */ 1688 | 0x00, // 1689 | 0x00, // 1690 | 0xF8, // ##### 1691 | 0x08, // # 1692 | 0xE8, // ### # 1693 | 0x28, // # # 1694 | 0x28, // # # 1695 | 1696 | /* @1309 '\xBB' (5 pixels wide) */ 1697 | 0x28, // # # 1698 | 0x28, // # # 1699 | 0xE8, // ### # 1700 | 0x08, // # 1701 | 0xF8, // ##### 1702 | 0x00, // 1703 | 0x00, // 1704 | 1705 | /* @1316 '\xBC' (5 pixels wide) */ 1706 | 0x28, // # # 1707 | 0x28, // # # 1708 | 0x28, // # # 1709 | 0x28, // # # 1710 | 0xF8, // ##### 1711 | 0x00, // 1712 | 0x00, // 1713 | 1714 | /* @1323 '\xBD' (5 pixels wide) */ 1715 | 0x10, // # 1716 | 0x10, // # 1717 | 0xF0, // #### 1718 | 0x10, // # 1719 | 0xF0, // #### 1720 | 0x00, // 1721 | 0x00, // 1722 | 1723 | /* @1330 '\xBE' (5 pixels wide) */ 1724 | 0x00, // 1725 | 0x00, // 1726 | 0x00, // 1727 | 0x00, // 1728 | 0xF0, // #### 1729 | 0x10, // # 1730 | 0x10, // # 1731 | 1732 | /* @1337 '\xBF' (5 pixels wide) */ 1733 | 0x10, // # 1734 | 0x10, // # 1735 | 0x10, // # 1736 | 0x10, // # 1737 | 0x18, // ## 1738 | 0x00, // 1739 | 0x00, // 1740 | 1741 | /* @1344 '\xC0' (5 pixels wide) */ 1742 | 0x10, // # 1743 | 0x10, // # 1744 | 0x10, // # 1745 | 0x10, // # 1746 | 0xF8, // ##### 1747 | 0x00, // 1748 | 0x00, // 1749 | 1750 | /* @1351 '\xC1' (5 pixels wide) */ 1751 | 0x00, // 1752 | 0x00, // 1753 | 0x00, // 1754 | 0x00, // 1755 | 0xF8, // ##### 1756 | 0x10, // # 1757 | 0x10, // # 1758 | 1759 | /* @1358 '\xC2' (5 pixels wide) */ 1760 | 0x10, // # 1761 | 0x10, // # 1762 | 0x10, // # 1763 | 0x10, // # 1764 | 0x18, // ## 1765 | 0x10, // # 1766 | 0x10, // # 1767 | 1768 | /* @1365 '\xC3' (5 pixels wide) */ 1769 | 0x00, // 1770 | 0x00, // 1771 | 0x00, // 1772 | 0x00, // 1773 | 0xF8, // ##### 1774 | 0x00, // 1775 | 0x00, // 1776 | 1777 | /* @1372 '\xC4' (5 pixels wide) */ 1778 | 0x10, // # 1779 | 0x10, // # 1780 | 0x10, // # 1781 | 0x10, // # 1782 | 0xF8, // ##### 1783 | 0x10, // # 1784 | 0x10, // # 1785 | 1786 | /* @1379 '\xC5' (5 pixels wide) */ 1787 | 0x10, // # 1788 | 0x10, // # 1789 | 0x18, // ## 1790 | 0x10, // # 1791 | 0x18, // ## 1792 | 0x10, // # 1793 | 0x10, // # 1794 | 1795 | /* @1386 '\xC6' (5 pixels wide) */ 1796 | 0x28, // # # 1797 | 0x28, // # # 1798 | 0x28, // # # 1799 | 0x28, // # # 1800 | 0x28, // # # 1801 | 0x28, // # # 1802 | 0x28, // # # 1803 | 1804 | /* @1393 '\xC7' (5 pixels wide) */ 1805 | 0x28, // # # 1806 | 0x28, // # # 1807 | 0x28, // # # 1808 | 0x20, // # 1809 | 0x38, // ### 1810 | 0x00, // 1811 | 0x00, // 1812 | 1813 | /* @1400 '\xC8' (5 pixels wide) */ 1814 | 0x00, // 1815 | 0x00, // 1816 | 0x38, // ### 1817 | 0x20, // # 1818 | 0x28, // # # 1819 | 0x28, // # # 1820 | 0x28, // # # 1821 | 1822 | /* @1407 '\xC9' (5 pixels wide) */ 1823 | 0x28, // # # 1824 | 0x28, // # # 1825 | 0xE8, // ### # 1826 | 0x00, // 1827 | 0xF8, // ##### 1828 | 0x00, // 1829 | 0x00, // 1830 | 1831 | /* @1414 '\xCA' (5 pixels wide) */ 1832 | 0x00, // 1833 | 0x00, // 1834 | 0xF8, // ##### 1835 | 0x00, // 1836 | 0xE8, // ### # 1837 | 0x28, // # # 1838 | 0x28, // # # 1839 | 1840 | /* @1421 '\xCB' (5 pixels wide) */ 1841 | 0x28, // # # 1842 | 0x28, // # # 1843 | 0x28, // # # 1844 | 0x20, // # 1845 | 0x28, // # # 1846 | 0x28, // # # 1847 | 0x28, // # # 1848 | 1849 | /* @1428 '\xCC' (5 pixels wide) */ 1850 | 0x00, // 1851 | 0x00, // 1852 | 0xF8, // ##### 1853 | 0x00, // 1854 | 0xF8, // ##### 1855 | 0x00, // 1856 | 0x00, // 1857 | 1858 | /* @1435 '\xCD' (5 pixels wide) */ 1859 | 0x28, // # # 1860 | 0x28, // # # 1861 | 0xE8, // ### # 1862 | 0x00, // 1863 | 0xE8, // ### # 1864 | 0x28, // # # 1865 | 0x28, // # # 1866 | 1867 | /* @1442 '\xCE' (5 pixels wide) */ 1868 | 0x10, // # 1869 | 0x10, // # 1870 | 0xF8, // ##### 1871 | 0x00, // 1872 | 0xF8, // ##### 1873 | 0x00, // 1874 | 0x00, // 1875 | 1876 | /* @1449 '\xCF' (5 pixels wide) */ 1877 | 0x28, // # # 1878 | 0x28, // # # 1879 | 0x28, // # # 1880 | 0x28, // # # 1881 | 0xF8, // ##### 1882 | 0x00, // 1883 | 0x00, // 1884 | 1885 | /* @1456 '\xD0' (5 pixels wide) */ 1886 | 0x00, // 1887 | 0x00, // 1888 | 0xF8, // ##### 1889 | 0x00, // 1890 | 0xF8, // ##### 1891 | 0x10, // # 1892 | 0x10, // # 1893 | 1894 | /* @1463 '\xD1' (5 pixels wide) */ 1895 | 0x00, // 1896 | 0x00, // 1897 | 0x00, // 1898 | 0x00, // 1899 | 0xF8, // ##### 1900 | 0x28, // # # 1901 | 0x28, // # # 1902 | 1903 | /* @1470 '\xD2' (5 pixels wide) */ 1904 | 0x28, // # # 1905 | 0x28, // # # 1906 | 0x28, // # # 1907 | 0x28, // # # 1908 | 0x38, // ### 1909 | 0x00, // 1910 | 0x00, // 1911 | 1912 | /* @1477 '\xD3' (5 pixels wide) */ 1913 | 0x10, // # 1914 | 0x10, // # 1915 | 0x18, // ## 1916 | 0x10, // # 1917 | 0x18, // ## 1918 | 0x00, // 1919 | 0x00, // 1920 | 1921 | /* @1484 '\xD4' (5 pixels wide) */ 1922 | 0x00, // 1923 | 0x00, // 1924 | 0x18, // ## 1925 | 0x10, // # 1926 | 0x18, // ## 1927 | 0x10, // # 1928 | 0x10, // # 1929 | 1930 | /* @1491 '\xD5' (5 pixels wide) */ 1931 | 0x00, // 1932 | 0x00, // 1933 | 0x00, // 1934 | 0x00, // 1935 | 0x38, // ### 1936 | 0x28, // # # 1937 | 0x28, // # # 1938 | 1939 | /* @1498 '\xD6' (5 pixels wide) */ 1940 | 0x28, // # # 1941 | 0x28, // # # 1942 | 0x28, // # # 1943 | 0x28, // # # 1944 | 0xF8, // ##### 1945 | 0x28, // # # 1946 | 0x28, // # # 1947 | 1948 | /* @1505 '\xD7' (5 pixels wide) */ 1949 | 0x10, // # 1950 | 0x10, // # 1951 | 0xF8, // ##### 1952 | 0x10, // # 1953 | 0xF8, // ##### 1954 | 0x10, // # 1955 | 0x10, // # 1956 | 1957 | /* @1512 '\xD8' (5 pixels wide) */ 1958 | 0x10, // # 1959 | 0x10, // # 1960 | 0x10, // # 1961 | 0x10, // # 1962 | 0xF0, // #### 1963 | 0x00, // 1964 | 0x00, // 1965 | 1966 | /* @1519 '\xD9' (5 pixels wide) */ 1967 | 0x00, // 1968 | 0x00, // 1969 | 0x00, // 1970 | 0x00, // 1971 | 0x18, // ## 1972 | 0x10, // # 1973 | 0x10, // # 1974 | 1975 | /* @1526 '\xDA' (5 pixels wide) */ 1976 | 0xF8, // ##### 1977 | 0xF8, // ##### 1978 | 0xF8, // ##### 1979 | 0xF8, // ##### 1980 | 0xF8, // ##### 1981 | 0xF8, // ##### 1982 | 0xF8, // ##### 1983 | 1984 | /* @1533 '\xDB' (5 pixels wide) */ 1985 | 0x00, // 1986 | 0x00, // 1987 | 0x00, // 1988 | 0x00, // 1989 | 0xF8, // ##### 1990 | 0xF8, // ##### 1991 | 0xF8, // ##### 1992 | 1993 | /* @1540 '\xDC' (5 pixels wide) */ 1994 | 0xE0, // ### 1995 | 0xE0, // ### 1996 | 0xE0, // ### 1997 | 0xE0, // ### 1998 | 0xE0, // ### 1999 | 0xE0, // ### 2000 | 0xE0, // ### 2001 | 2002 | /* @1547 '\xDD' (5 pixels wide) */ 2003 | 0x18, // ## 2004 | 0x18, // ## 2005 | 0x18, // ## 2006 | 0x18, // ## 2007 | 0x18, // ## 2008 | 0x18, // ## 2009 | 0x18, // ## 2010 | 2011 | /* @1554 '\xDE' (5 pixels wide) */ 2012 | 0xF8, // ##### 2013 | 0xF8, // ##### 2014 | 0xF8, // ##### 2015 | 0xF8, // ##### 2016 | 0x00, // 2017 | 0x00, // 2018 | 0x00, // 2019 | 2020 | /* @1561 '\xDF' (5 pixels wide) */ 2021 | 0x00, // 2022 | 0x00, // 2023 | 0x68, // ## # 2024 | 0x90, // # # 2025 | 0x90, // # # 2026 | 0x90, // # # 2027 | 0x68, // ## # 2028 | 2029 | /* @1568 '\xE0' (5 pixels wide) */ 2030 | 0x00, // 2031 | 0x70, // ### 2032 | 0x88, // # # 2033 | 0xF0, // #### 2034 | 0x88, // # # 2035 | 0x88, // # # 2036 | 0xF0, // #### 2037 | 2038 | /* @1575 '\xE1' (5 pixels wide) */ 2039 | 0x00, // 2040 | 0xF8, // ##### 2041 | 0x98, // # ## 2042 | 0x80, // # 2043 | 0x80, // # 2044 | 0x80, // # 2045 | 0x80, // # 2046 | 2047 | /* @1582 '\xE2' (5 pixels wide) */ 2048 | 0x00, // 2049 | 0xF8, // ##### 2050 | 0x50, // # # 2051 | 0x50, // # # 2052 | 0x50, // # # 2053 | 0x50, // # # 2054 | 0x50, // # # 2055 | 2056 | /* @1589 '\xE3' (5 pixels wide) */ 2057 | 0xF8, // ##### 2058 | 0x88, // # # 2059 | 0x40, // # 2060 | 0x20, // # 2061 | 0x40, // # 2062 | 0x88, // # # 2063 | 0xF8, // ##### 2064 | 2065 | /* @1596 '\xE4' (5 pixels wide) */ 2066 | 0x00, // 2067 | 0x00, // 2068 | 0x78, // #### 2069 | 0x90, // # # 2070 | 0x90, // # # 2071 | 0x90, // # # 2072 | 0x60, // ## 2073 | 2074 | /* @1603 '\xE5' (5 pixels wide) */ 2075 | 0x00, // 2076 | 0x50, // # # 2077 | 0x50, // # # 2078 | 0x50, // # # 2079 | 0x50, // # # 2080 | 0x68, // ## # 2081 | 0xC0, // ## 2082 | 2083 | /* @1610 '\xE6' (5 pixels wide) */ 2084 | 0x00, // 2085 | 0xF8, // ##### 2086 | 0xA0, // # # 2087 | 0x20, // # 2088 | 0x20, // # 2089 | 0x20, // # 2090 | 0x20, // # 2091 | 2092 | /* @1617 '\xE7' (5 pixels wide) */ 2093 | 0xF8, // ##### 2094 | 0x20, // # 2095 | 0x70, // ### 2096 | 0x88, // # # 2097 | 0x88, // # # 2098 | 0x70, // ### 2099 | 0x20, // # 2100 | 2101 | /* @1624 '\xE8' (5 pixels wide) */ 2102 | 0x20, // # 2103 | 0x50, // # # 2104 | 0x88, // # # 2105 | 0xF8, // ##### 2106 | 0x88, // # # 2107 | 0x50, // # # 2108 | 0x20, // # 2109 | 2110 | /* @1631 '\xE9' (5 pixels wide) */ 2111 | 0x20, // # 2112 | 0x50, // # # 2113 | 0x88, // # # 2114 | 0x88, // # # 2115 | 0x50, // # # 2116 | 0x50, // # # 2117 | 0xD8, // ## ## 2118 | 2119 | /* @1638 '\xEA' (5 pixels wide) */ 2120 | 0x30, // ## 2121 | 0x40, // # 2122 | 0x30, // ## 2123 | 0x70, // ### 2124 | 0x88, // # # 2125 | 0x88, // # # 2126 | 0x70, // ### 2127 | 2128 | /* @1645 '\xEB' (5 pixels wide) */ 2129 | 0x00, // 2130 | 0x00, // 2131 | 0x00, // 2132 | 0x70, // ### 2133 | 0xA8, // # # # 2134 | 0xA8, // # # # 2135 | 0x70, // ### 2136 | 2137 | /* @1652 '\xEC' (5 pixels wide) */ 2138 | 0x08, // # 2139 | 0x70, // ### 2140 | 0x98, // # ## 2141 | 0xA8, // # # # 2142 | 0xA8, // # # # 2143 | 0xC8, // ## # 2144 | 0x70, // ### 2145 | 2146 | /* @1659 '\xED' (5 pixels wide) */ 2147 | 0x70, // ### 2148 | 0x80, // # 2149 | 0x80, // # 2150 | 0xF0, // #### 2151 | 0x80, // # 2152 | 0x80, // # 2153 | 0x70, // ### 2154 | 2155 | /* @1666 '\xEE' (5 pixels wide) */ 2156 | 0x70, // ### 2157 | 0x88, // # # 2158 | 0x88, // # # 2159 | 0x88, // # # 2160 | 0x88, // # # 2161 | 0x88, // # # 2162 | 0x88, // # # 2163 | 2164 | /* @1673 '\xEF' (5 pixels wide) */ 2165 | 0x00, // 2166 | 0xF8, // ##### 2167 | 0x00, // 2168 | 0xF8, // ##### 2169 | 0x00, // 2170 | 0xF8, // ##### 2171 | 0x00, // 2172 | 2173 | /* @1680 '\xF0' (5 pixels wide) */ 2174 | 0x20, // # 2175 | 0x20, // # 2176 | 0xF8, // ##### 2177 | 0x20, // # 2178 | 0x20, // # 2179 | 0x00, // 2180 | 0xF8, // ##### 2181 | 2182 | /* @1687 '\xF1' (5 pixels wide) */ 2183 | 0x40, // # 2184 | 0x20, // # 2185 | 0x10, // # 2186 | 0x20, // # 2187 | 0x40, // # 2188 | 0x00, // 2189 | 0xF8, // ##### 2190 | 2191 | /* @1694 '\xF2' (5 pixels wide) */ 2192 | 0x10, // # 2193 | 0x20, // # 2194 | 0x40, // # 2195 | 0x20, // # 2196 | 0x10, // # 2197 | 0x00, // 2198 | 0xF8, // ##### 2199 | 2200 | /* @1701 '\xF3' (5 pixels wide) */ 2201 | 0x38, // ### 2202 | 0x28, // # # 2203 | 0x20, // # 2204 | 0x20, // # 2205 | 0x20, // # 2206 | 0x20, // # 2207 | 0x20, // # 2208 | 2209 | /* @1708 '\xF4' (5 pixels wide) */ 2210 | 0x20, // # 2211 | 0x20, // # 2212 | 0x20, // # 2213 | 0x20, // # 2214 | 0x20, // # 2215 | 0xA0, // # # 2216 | 0xA0, // # # 2217 | 2218 | /* @1715 '\xF5' (5 pixels wide) */ 2219 | 0x30, // ## 2220 | 0x30, // ## 2221 | 0x00, // 2222 | 0xF8, // ##### 2223 | 0x00, // 2224 | 0x30, // ## 2225 | 0x30, // ## 2226 | 2227 | /* @1722 '\xF6' (5 pixels wide) */ 2228 | 0x00, // 2229 | 0xE8, // ### # 2230 | 0xB8, // # ### 2231 | 0x00, // 2232 | 0xE8, // ### # 2233 | 0xB8, // # ### 2234 | 0x00, // 2235 | 2236 | /* @1729 '\xF7' (5 pixels wide) */ 2237 | 0x70, // ### 2238 | 0xD8, // ## ## 2239 | 0xD8, // ## ## 2240 | 0x70, // ### 2241 | 0x00, // 2242 | 0x00, // 2243 | 0x00, // 2244 | 2245 | /* @1736 '\xF8' (5 pixels wide) */ 2246 | 0x00, // 2247 | 0x00, // 2248 | 0x00, // 2249 | 0x30, // ## 2250 | 0x30, // ## 2251 | 0x00, // 2252 | 0x00, // 2253 | 2254 | /* @1743 '\xF9' (5 pixels wide) */ 2255 | 0x00, // 2256 | 0x00, // 2257 | 0x00, // 2258 | 0x00, // 2259 | 0x30, // ## 2260 | 0x00, // 2261 | 0x00, // 2262 | 2263 | /* @1750 '\xFA' (5 pixels wide) */ 2264 | 0x38, // ### 2265 | 0x20, // # 2266 | 0x20, // # 2267 | 0x20, // # 2268 | 0xA0, // # # 2269 | 0xA0, // # # 2270 | 0x60, // ## 2271 | 2272 | /* @1757 '\xFB' (5 pixels wide) */ 2273 | 0x70, // ### 2274 | 0x48, // # # 2275 | 0x48, // # # 2276 | 0x48, // # # 2277 | 0x48, // # # 2278 | 0x00, // 2279 | 0x00, // 2280 | 2281 | /* @1764 '\xFC' (5 pixels wide) */ 2282 | 0x70, // ### 2283 | 0x18, // ## 2284 | 0x30, // ## 2285 | 0x60, // ## 2286 | 0x78, // #### 2287 | 0x00, // 2288 | 0x00, // 2289 | 2290 | /* @1771 '\xFD' (5 pixels wide) */ 2291 | 0x00, // 2292 | 0x00, // 2293 | 0x78, // #### 2294 | 0x78, // #### 2295 | 0x78, // #### 2296 | 0x78, // #### 2297 | 0x00, // 2298 | 2299 | /* @1778 '\xFE' (5 pixels wide) */ 2300 | 0x00, // 2301 | 0x00, // 2302 | 0x00, // 2303 | 0x00, // 2304 | 0x00, // 2305 | 0x00, // 2306 | 0x00, // 2307 | 2308 | /* @1785 '\xFF' (5 pixels wide) */ 2309 | 0x08, // # 2310 | 0x28, // # # 2311 | 0x08, // # 2312 | 0x28, // # # 2313 | 0x00, // 2314 | 0x78, // #### 2315 | 0x08, // # 2316 | 2317 | }; 2318 | 2319 | /* Character descriptors for glcd 5x7 */ 2320 | /* { [Char width in bits], [Offset into glcd_5x7_bitmaps in bytes] } */ 2321 | const font_char_desc_t glcd_5x7_descriptors[] = 2322 | { 2323 | {5, 0}, /* \x00 */ 2324 | {5, 7}, /* \x01 */ 2325 | {5, 14}, /* \x02 */ 2326 | {5, 21}, /* \x03 */ 2327 | {5, 28}, /* \x04 */ 2328 | {5, 35}, /* \x05 */ 2329 | {5, 42}, /* \x06 */ 2330 | {5, 49}, /* \x07 */ 2331 | {5, 56}, /* \x08 */ 2332 | {5, 63}, /* \x09 */ 2333 | {5, 70}, /* \x0A */ 2334 | {5, 77}, /* \x0B */ 2335 | {5, 84}, /* \x0C */ 2336 | {5, 91}, /* \x0D */ 2337 | {5, 98}, /* \x0E */ 2338 | {5, 105}, /* \x0F */ 2339 | {5, 112}, /* \x10 */ 2340 | {5, 119}, /* \x11 */ 2341 | {5, 126}, /* \x12 */ 2342 | {5, 133}, /* \x13 */ 2343 | {5, 140}, /* \x14 */ 2344 | {5, 147}, /* \x15 */ 2345 | {5, 154}, /* \x16 */ 2346 | {5, 161}, /* \x17 */ 2347 | {5, 168}, /* \x18 */ 2348 | {5, 175}, /* \x19 */ 2349 | {5, 182}, /* \x1A */ 2350 | {5, 189}, /* \x1B */ 2351 | {5, 196}, /* \x1C */ 2352 | {5, 203}, /* \x1D */ 2353 | {5, 210}, /* \x1E */ 2354 | {5, 217}, /* \x1F */ 2355 | {5, 224}, /* */ 2356 | {5, 231}, /* ! */ 2357 | {5, 238}, /* " */ 2358 | {5, 245}, /* # */ 2359 | {5, 252}, /* $ */ 2360 | {5, 259}, /* % */ 2361 | {5, 266}, /* & */ 2362 | {5, 273}, /* ' */ 2363 | {5, 280}, /* ( */ 2364 | {5, 287}, /* ) */ 2365 | {5, 294}, /* * */ 2366 | {5, 301}, /* + */ 2367 | {5, 308}, /* , */ 2368 | {5, 315}, /* - */ 2369 | {5, 322}, /* . */ 2370 | {5, 329}, /* / */ 2371 | {5, 336}, /* 0 */ 2372 | {5, 343}, /* 1 */ 2373 | {5, 350}, /* 2 */ 2374 | {5, 357}, /* 3 */ 2375 | {5, 364}, /* 4 */ 2376 | {5, 371}, /* 5 */ 2377 | {5, 378}, /* 6 */ 2378 | {5, 385}, /* 7 */ 2379 | {5, 392}, /* 8 */ 2380 | {5, 399}, /* 9 */ 2381 | {5, 406}, /* : */ 2382 | {5, 413}, /* ; */ 2383 | {5, 420}, /* < */ 2384 | {5, 427}, /* = */ 2385 | {5, 434}, /* > */ 2386 | {5, 441}, /* ? */ 2387 | {5, 448}, /* @ */ 2388 | {5, 455}, /* A */ 2389 | {5, 462}, /* B */ 2390 | {5, 469}, /* C */ 2391 | {5, 476}, /* D */ 2392 | {5, 483}, /* E */ 2393 | {5, 490}, /* F */ 2394 | {5, 497}, /* G */ 2395 | {5, 504}, /* H */ 2396 | {5, 511}, /* I */ 2397 | {5, 518}, /* J */ 2398 | {5, 525}, /* K */ 2399 | {5, 532}, /* L */ 2400 | {5, 539}, /* M */ 2401 | {5, 546}, /* N */ 2402 | {5, 553}, /* O */ 2403 | {5, 560}, /* P */ 2404 | {5, 567}, /* Q */ 2405 | {5, 574}, /* R */ 2406 | {5, 581}, /* S */ 2407 | {5, 588}, /* T */ 2408 | {5, 595}, /* U */ 2409 | {5, 602}, /* V */ 2410 | {5, 609}, /* W */ 2411 | {5, 616}, /* X */ 2412 | {5, 623}, /* Y */ 2413 | {5, 630}, /* Z */ 2414 | {5, 637}, /* [ */ 2415 | {5, 644}, /* \ */ 2416 | {5, 651}, /* ] */ 2417 | {5, 658}, /* ^ */ 2418 | {5, 665}, /* _ */ 2419 | {5, 672}, /* ` */ 2420 | {5, 679}, /* a */ 2421 | {5, 686}, /* b */ 2422 | {5, 693}, /* c */ 2423 | {5, 700}, /* d */ 2424 | {5, 707}, /* e */ 2425 | {5, 714}, /* f */ 2426 | {5, 721}, /* g */ 2427 | {5, 728}, /* h */ 2428 | {5, 735}, /* i */ 2429 | {5, 742}, /* j */ 2430 | {5, 749}, /* k */ 2431 | {5, 756}, /* l */ 2432 | {5, 763}, /* m */ 2433 | {5, 770}, /* n */ 2434 | {5, 777}, /* o */ 2435 | {5, 784}, /* p */ 2436 | {5, 791}, /* q */ 2437 | {5, 798}, /* r */ 2438 | {5, 805}, /* s */ 2439 | {5, 812}, /* t */ 2440 | {5, 819}, /* u */ 2441 | {5, 826}, /* v */ 2442 | {5, 833}, /* w */ 2443 | {5, 840}, /* x */ 2444 | {5, 847}, /* y */ 2445 | {5, 854}, /* z */ 2446 | {5, 861}, /* { */ 2447 | {5, 868}, /* | */ 2448 | {5, 875}, /* } */ 2449 | {5, 882}, /* ~ */ 2450 | {5, 889}, /* \x7F */ 2451 | {5, 896}, /* \x80 */ 2452 | {5, 903}, /* \x81 */ 2453 | {5, 910}, /* \x82 */ 2454 | {5, 917}, /* \x83 */ 2455 | {5, 924}, /* \x84 */ 2456 | {5, 931}, /* \x85 */ 2457 | {5, 938}, /* \x86 */ 2458 | {5, 945}, /* \x87 */ 2459 | {5, 952}, /* \x88 */ 2460 | {5, 959}, /* \x89 */ 2461 | {5, 966}, /* \x8A */ 2462 | {5, 973}, /* \x8B */ 2463 | {5, 980}, /* \x8C */ 2464 | {5, 987}, /* \x8D */ 2465 | {5, 994}, /* \x8E */ 2466 | {5, 1001}, /* \x8F */ 2467 | {5, 1008}, /* \x90 */ 2468 | {5, 1015}, /* \x91 */ 2469 | {5, 1022}, /* \x92 */ 2470 | {5, 1029}, /* \x93 */ 2471 | {5, 1036}, /* \x94 */ 2472 | {5, 1043}, /* \x95 */ 2473 | {5, 1050}, /* \x96 */ 2474 | {5, 1057}, /* \x97 */ 2475 | {5, 1064}, /* \x98 */ 2476 | {5, 1071}, /* \x99 */ 2477 | {5, 1078}, /* \x9A */ 2478 | {5, 1085}, /* \x9B */ 2479 | {5, 1092}, /* \x9C */ 2480 | {5, 1099}, /* \x9D */ 2481 | {5, 1106}, /* \x9E */ 2482 | {5, 1113}, /* \x9F */ 2483 | {5, 1120}, /* \xA0 */ 2484 | {5, 1127}, /* \xA1 */ 2485 | {5, 1134}, /* \xA2 */ 2486 | {5, 1141}, /* \xA3 */ 2487 | {5, 1148}, /* \xA4 */ 2488 | {5, 1155}, /* \xA5 */ 2489 | {5, 1162}, /* \xA6 */ 2490 | {5, 1169}, /* \xA7 */ 2491 | {5, 1176}, /* \xA8 */ 2492 | {5, 1183}, /* \xA9 */ 2493 | {5, 1190}, /* \xAA */ 2494 | {5, 1197}, /* \xAB */ 2495 | {5, 1204}, /* \xAC */ 2496 | {5, 1211}, /* \xAD */ 2497 | {5, 1218}, /* \xAE */ 2498 | {5, 1225}, /* \xAF */ 2499 | {5, 1232}, /* \xB0 */ 2500 | {5, 1239}, /* \xB1 */ 2501 | {5, 1246}, /* \xB2 */ 2502 | {5, 1253}, /* \xB3 */ 2503 | {5, 1260}, /* \xB4 */ 2504 | {5, 1267}, /* \xB5 */ 2505 | {5, 1274}, /* \xB6 */ 2506 | {5, 1281}, /* \xB7 */ 2507 | {5, 1288}, /* \xB8 */ 2508 | {5, 1295}, /* \xB9 */ 2509 | {5, 1302}, /* \xBA */ 2510 | {5, 1309}, /* \xBB */ 2511 | {5, 1316}, /* \xBC */ 2512 | {5, 1323}, /* \xBD */ 2513 | {5, 1330}, /* \xBE */ 2514 | {5, 1337}, /* \xBF */ 2515 | {5, 1344}, /* \xC0 */ 2516 | {5, 1351}, /* \xC1 */ 2517 | {5, 1358}, /* \xC2 */ 2518 | {5, 1365}, /* \xC3 */ 2519 | {5, 1372}, /* \xC4 */ 2520 | {5, 1379}, /* \xC5 */ 2521 | {5, 1386}, /* \xC6 */ 2522 | {5, 1393}, /* \xC7 */ 2523 | {5, 1400}, /* \xC8 */ 2524 | {5, 1407}, /* \xC9 */ 2525 | {5, 1414}, /* \xCA */ 2526 | {5, 1421}, /* \xCB */ 2527 | {5, 1428}, /* \xCC */ 2528 | {5, 1435}, /* \xCD */ 2529 | {5, 1442}, /* \xCE */ 2530 | {5, 1449}, /* \xCF */ 2531 | {5, 1456}, /* \xD0 */ 2532 | {5, 1463}, /* \xD1 */ 2533 | {5, 1470}, /* \xD2 */ 2534 | {5, 1477}, /* \xD3 */ 2535 | {5, 1484}, /* \xD4 */ 2536 | {5, 1491}, /* \xD5 */ 2537 | {5, 1498}, /* \xD6 */ 2538 | {5, 1505}, /* \xD7 */ 2539 | {5, 1512}, /* \xD8 */ 2540 | {5, 1519}, /* \xD9 */ 2541 | {5, 1526}, /* \xDA */ 2542 | {5, 1533}, /* \xDB */ 2543 | {5, 1540}, /* \xDC */ 2544 | {5, 1547}, /* \xDD */ 2545 | {5, 1554}, /* \xDE */ 2546 | {5, 1561}, /* \xDF */ 2547 | {5, 1568}, /* \xE0 */ 2548 | {5, 1575}, /* \xE1 */ 2549 | {5, 1582}, /* \xE2 */ 2550 | {5, 1589}, /* \xE3 */ 2551 | {5, 1596}, /* \xE4 */ 2552 | {5, 1603}, /* \xE5 */ 2553 | {5, 1610}, /* \xE6 */ 2554 | {5, 1617}, /* \xE7 */ 2555 | {5, 1624}, /* \xE8 */ 2556 | {5, 1631}, /* \xE9 */ 2557 | {5, 1638}, /* \xEA */ 2558 | {5, 1645}, /* \xEB */ 2559 | {5, 1652}, /* \xEC */ 2560 | {5, 1659}, /* \xED */ 2561 | {5, 1666}, /* \xEE */ 2562 | {5, 1673}, /* \xEF */ 2563 | {5, 1680}, /* \xF0 */ 2564 | {5, 1687}, /* \xF1 */ 2565 | {5, 1694}, /* \xF2 */ 2566 | {5, 1701}, /* \xF3 */ 2567 | {5, 1708}, /* \xF4 */ 2568 | {5, 1715}, /* \xF5 */ 2569 | {5, 1722}, /* \xF6 */ 2570 | {5, 1729}, /* \xF7 */ 2571 | {5, 1736}, /* \xF8 */ 2572 | {5, 1743}, /* \xF9 */ 2573 | {5, 1750}, /* \xFA */ 2574 | {5, 1757}, /* \xFB */ 2575 | {5, 1764}, /* \xFC */ 2576 | {5, 1771}, /* \xFD */ 2577 | {5, 1778}, /* \xFE */ 2578 | {5, 1785}, /* \xFF */ 2579 | }; 2580 | 2581 | /* Font information for glcd 5x7 */ 2582 | const font_info_t glcd_5x7_font_info = 2583 | { 2584 | 7, /* Character height */ 2585 | 1, /* C */ 2586 | 0, /* Start character */ 2587 | 255, /* End character */ 2588 | glcd_5x7_descriptors, /* Character descriptor array */ 2589 | glcd_5x7_bitmaps, /* Character bitmap array */ 2590 | }; 2591 | 2592 | --------------------------------------------------------------------------------