Graphic OLED 100x16 pixels interface

Dependents:   mbed_nicovideo_search_api mbed_recent_nicovideo_display_pub

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers misaki_4x8_jis201.cpp Source File

misaki_4x8_jis201.cpp

00001 // misaki_4x8_jis201.cpp
00002 #include "mbed.h"
00003 //
00004 // misaki_bdf_b11a.tar.gz misaki_4x8_jisx0201.bdf
00005 const uint8_t misaki_4x8_jisx0201[][4] = { // 20-7e, a1-df
00006 {0,0,0,0},{0,47,0,0},{3,0,3,0},{63,18,63,0},{22,63,26,0},{18,8,36,0},{50,61,42,0},{2,1,0,0},{0,62,65,0},
00007 {65,62,0,0},{10,7,10,0},{8,62,8,0},{0,64,32,0},{8,8,8,0},{0,32,0,0},{16,8,4,0},{28,42,28,0},{36,62,32,0},
00008 {50,42,36,0},{34,42,20,0},{24,20,62,0},{46,42,18,0},{28,42,18,0},{2,58,6,0},{20,42,20,0},{36,42,28,0},
00009 {0,20,0,0},{32,20,0,0},{8,20,34,0},{20,20,20,0},{34,20,8,0},{2,41,6,0},{18,41,30,0},{62,9,62,0},
00010 {63,37,26,0},{30,33,33,0},{63,33,30,0},{63,37,33,0},{63,5,1,0},{30,33,57,0},{63,8,63,0},{33,63,33,0},
00011 {16,32,31,0},{63,4,59,0},{63,32,32,0},{63,6,63,0},{63,1,62,0},{30,33,30,0},{63,9,6,0},{30,33,94,0},
00012 {63,9,54,0},{34,37,25,0},{1,63,1,0},{63,32,63,0},{63,16,15,0},{63,24,63,0},{51,12,51,0},{3,60,3,0},
00013 {49,45,35,0},{0,127,65,0},{21,62,21,0},{65,127,0,0},{2,1,2,0},{64,64,64,0},{0,1,2,0},{24,36,60,0},
00014 {63,36,24,0},{24,36,36,0},{24,36,63,0},{24,44,44,0},{4,63,5,0},{72,84,60,0},{63,4,56,0},{0,61,0,0},
00015 {64,61,0,0},{63,8,52,0},{1,63,0,0},{60,28,56,0},{60,4,56,0},{24,36,24,0},{124,36,24,0},{24,36,124,0},
00016 {60,8,4,0},{40,60,20,0},{4,62,36,0},{60,32,60,0},{60,16,12,0},{60,48,60,0},{36,24,36,0},{76,80,60,0},
00017 {36,52,44,0},{8,54,65,0},{0,127,0,0},{65,54,8,0},{1,1,1,0},{16,40,16,0},{31,1,1,0},{32,32,62,0},
00018 {16,32,0,0},{0,8,0,0},{37,21,15,0},{36,28,12,0},{16,56,4,0},{24,12,56,0},{40,56,40,0},{40,24,60,0},
00019 {8,60,24,0},{40,56,32,0},{36,44,60,0},{44,44,28,0},{4,8,8,0},{33,29,7,0},{8,60,3,0},{6,35,30,0},
00020 {34,62,34,0},{18,10,63,0},{50,15,62,0},{10,63,10,0},{36,19,14,0},{39,30,2,0},{34,34,62,0},{39,18,15,0},
00021 {37,37,16,0},{33,25,39,0},{63,34,46,0},{33,22,15,0},{36,27,14,0},{37,31,5,0},{38,38,30,0},{37,29,5,0},
00022 {63,4,8,0},{36,31,4,0},{32,34,34,0},{37,25,39,0},{18,59,22,0},{32,16,15,0},{60,1,62,0},{31,36,36,0},
00023 {33,17,15,0},{12,3,28,0},{26,63,26,0},{9,25,39,0},{34,42,42,0},{56,39,48,0},{50,12,19,0},{5,63,37,0},
00024 {2,63,14,0},{33,63,32,0},{37,37,63,0},{37,37,29,0},{7,32,31,0},{60,63,32,0},{63,32,16,0},{62,34,62,0},
00025 {35,17,15,0},{33,33,24,0},{1,0,1,0},{2,5,2,0},
00026 };
00027 
00028 void  font_4x8(uint8_t buf[], int c) {
00029     int i = 0;
00030     if (c >= 0xa1 && c <= 0xdf) {
00031         i = c - 66;
00032     } else if (c >= 0x20 && c <= 0x7e) { // 20 - 7e
00033         i = c - 32;
00034     }
00035     memcpy(buf, misaki_4x8_jisx0201[i], 4);
00036 }
00037