123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
-
- #include <stdint.h>
- #include <avr/io.h>
- #include <avr/pgmspace.h>
-
- uint8_t font[95][8];
- uint8_t fontBuff[8];
-
- uint8_t *getFont(char c) {
- uint8_t i;
- if (!((c >= 0x20) && (c <= 0x7E))) {
- c = '?';
- }
- for (i = 0; i < 8; i++) {
- fontBuff[i] = pgm_read_byte(&(font[(uint8_t)(c - 0x20)][i]));
- }
- return fontBuff;
- }
-
-
-
-
-
-
-
-
-
- uint8_t font[95][8] PROGMEM = {
- {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- {0x7e, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18},
- {0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00},
- {0x66, 0xff, 0xff, 0x66, 0x66, 0xff, 0xff, 0x66},
- {0x18, 0xff, 0x19, 0x19, 0xfe, 0x98, 0xff, 0x18},
- {0x87, 0x45, 0x27, 0x10, 0x08, 0xe4, 0xa2, 0xe1},
- {0x1e, 0x33, 0x33, 0xde, 0xee, 0x3b, 0x73, 0xdc},
- {0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00},
- {0x18, 0x0c, 0x06, 0x03, 0x03, 0x06, 0x0c, 0x18},
- {0x18, 0x38, 0x60, 0xc0, 0xc0, 0x60, 0x38, 0x18},
- {0x99, 0x5a, 0x3c, 0xff, 0xff, 0x3c, 0x5a, 0x99},
- {0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18},
- {0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x0c},
- {0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00},
- {0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00},
- {0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x07, 0x03},
-
- {0x7e, 0xff, 0xe3, 0xd3, 0xcb, 0xc7, 0xff, 0x7e},
- {0x38, 0x3c, 0x36, 0x33, 0x31, 0x30, 0x30, 0x30},
- {0x7c, 0x7e, 0x62, 0x30, 0x18, 0x0c, 0x7e, 0x7e},
- {0x7e, 0xff, 0xc0, 0x78, 0x78, 0xc0, 0xff, 0x7e},
- {0xc3, 0xc3, 0xc3, 0xff, 0xff, 0xc0, 0xc0, 0xc0},
- {0xff, 0xff, 0x03, 0x3f, 0x7e, 0xc0, 0x7f, 0x3f},
- {0xfe, 0xff, 0x03, 0x7f, 0xff, 0xc3, 0xff, 0x7e},
- {0x7e, 0xff, 0xe0, 0x70, 0xfe, 0x1c, 0x0e, 0x07},
- {0x3c, 0x7e, 0xc3, 0x7e, 0x7e, 0xc3, 0x7e, 0x3c},
- {0x7e, 0xff, 0xc3, 0xff, 0xbe, 0x80, 0xff, 0x7e},
-
- {0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00},
- {0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x0c},
- {0xe0, 0x38, 0x0e, 0x03, 0x03, 0x0e, 0x38, 0xe0},
- {0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00},
- {0x07, 0x1c, 0x70, 0xc0, 0xc0, 0x70, 0x1c, 0x07},
- {0x3c, 0x66, 0x60, 0x30, 0x18, 0x00, 0x18, 0x18},
- {0x7e, 0xff, 0xc3, 0x3b, 0x3b, 0x03, 0xff, 0x7e},
-
- {0x7e, 0xff, 0xc3, 0xc3, 0xff, 0xff, 0xc3, 0xc3},
- {0x7f, 0x83, 0x83, 0x83, 0x7f, 0x83, 0x83, 0x7f},
- {0x7e, 0xff, 0x03, 0x03, 0x03, 0x03, 0xff, 0x7e},
- {0x1e, 0x3f, 0x63, 0xc3, 0xc3, 0x63, 0x3f, 0x1e},
- {0xfe, 0xff, 0x03, 0x3f, 0x3f, 0x03, 0xff, 0xfe},
- {0xfe, 0xff, 0x03, 0x3f, 0x3f, 0x03, 0x03, 0x03},
- {0xfe, 0xff, 0x03, 0x63, 0xf3, 0xc3, 0xff, 0x7e},
- {0xc3, 0xc3, 0xc3, 0xff, 0xff, 0xc3, 0xc3, 0xc3},
- {0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c},
- {0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc6, 0x66, 0x3c},
- {0xc3, 0x63, 0x33, 0x1f, 0x1f, 0x33, 0x63, 0xc3},
- {0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xff, 0xff},
- {0x66, 0xff, 0xdb, 0xdb, 0xdb, 0xdb, 0xc3, 0xc3},
- {0xc7, 0xcf, 0xcf, 0xdb, 0xdb, 0xf3, 0xf3, 0xe3},
- {0x7e, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0x7e},
- {0x3e, 0x7f, 0xc3, 0xc3, 0x7f, 0x3f, 0x03, 0x03},
- {0x3c, 0x7e, 0xc3, 0xc3, 0xd3, 0xe3, 0x7e, 0xbc},
- {0x3e, 0x7f, 0xc3, 0x7f, 0x3f, 0x1f, 0x3b, 0x73},
- {0xfe, 0xff, 0x03, 0x7f, 0xfe, 0x80, 0xff, 0x7f},
- {0xff, 0xff, 0x99, 0x18, 0x18, 0x18, 0x18, 0x3c},
- {0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0x7e},
- {0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18},
- {0xc3, 0xc3, 0xc3, 0xdb, 0xdb, 0xdb, 0xff, 0x7e},
- {0xc3, 0xe7, 0x7e, 0x3c, 0x3c, 0x7e, 0xe7, 0xc3},
- {0x81, 0xc3, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18},
- {0xfe, 0xff, 0x70, 0x38, 0x1c, 0x0e, 0xff, 0x7f},
-
- {0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0xff, 0xff},
- {0x03, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xc0},
- {0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xff},
- {0x18, 0x3c, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00},
- {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff},
- {0x0e, 0x1c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00},
-
- {0x00,0x00,0x1E,0x30,0x3E,0x33,0x6E,0x00},
- {0x07,0x06,0x3E,0x66,0x66,0x66,0x3D,0x00},
- {0x00,0x00,0x1E,0x33,0x03,0x33,0x1E,0x00},
- {0x38,0x30,0x30,0x3E,0x33,0x33,0x6E,0x00},
- {0x00,0x00,0x1E,0x33,0x3F,0x03,0x1E,0x00},
- {0x1C,0x36,0x06,0x0F,0x06,0x06,0x0F,0x00},
- {0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x1F},
- {0x07,0x06,0x36,0x6E,0x66,0x66,0x67,0x00},
- {0x0C,0x00,0x0E,0x0C,0x0C,0x0C,0x1E,0x00},
- {0x18,0x00,0x1E,0x18,0x18,0x18,0x1B,0x0E},
- {0x07,0x06,0x66,0x36,0x1E,0x36,0x67,0x00},
- {0x0E,0x0C,0x0C,0x0C,0x0C,0x0C,0x1E,0x00},
- {0x00,0x00,0x37,0x7F,0x6B,0x63,0x63,0x00},
- {0x00,0x00,0x1F,0x33,0x33,0x33,0x33,0x00},
- {0x00,0x00,0x1E,0x33,0x33,0x33,0x1E,0x00},
- {0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x0F},
- {0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x78},
- {0x00,0x00,0x1B,0x36,0x36,0x06,0x0F,0x00},
- {0x00,0x00,0x3E,0x03,0x1E,0x30,0x1F,0x00},
- {0x08,0x0C,0x3E,0x0C,0x0C,0x2C,0x18,0x00},
- {0x00,0x00,0x33,0x33,0x33,0x33,0x6E,0x00},
- {0x00,0x00,0x33,0x33,0x33,0x1E,0x0C,0x00},
- {0x00,0x00,0x63,0x63,0x6B,0x7F,0x36,0x00},
- {0x00,0x00,0x63,0x36,0x1C,0x36,0x63,0x00},
- {0x00,0x00,0x33,0x33,0x33,0x3E,0x30,0x1F},
- {0x00,0x00,0x3F,0x19,0x0C,0x26,0x3F,0x00},
-
- {0xf8, 0xfc, 0x0c, 0x07, 0x07, 0x0c, 0xfc, 0xf8},
- {0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18},
- {0x1f, 0x3f, 0x30, 0xe0, 0xe0, 0x30, 0x3f, 0x1f},
- {0x00, 0x04, 0x0e, 0x0b, 0x99, 0xd0, 0x70, 0x20},
- };
|