Backport GDISP low level drivers to GLCD
see GLCD/readme.txt
This commit is contained in:
parent
9a0521a85e
commit
34075031de
13 changed files with 1238 additions and 2395 deletions
342
glcd/console.c
342
glcd/console.c
|
@ -1,171 +1,171 @@
|
||||||
/*
|
/*
|
||||||
ChibiOS/RT - Copyright (C) 2012
|
ChibiOS/RT - Copyright (C) 2012
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
Joel Bodenmann aka Tectu <joel@unormal.org>
|
||||||
|
|
||||||
This file is part of ChibiOS-LCD-Driver.
|
This file is part of ChibiOS-LCD-Driver.
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
|
|
||||||
#include "fonts.h"
|
#include "glcd.h"
|
||||||
#include "glcd.h"
|
#include "console.h"
|
||||||
#include "console.h"
|
|
||||||
|
/*
|
||||||
/*
|
* Interface implementation. The interface is write only
|
||||||
* Interface implementation. The interface is write only
|
*/
|
||||||
*/
|
|
||||||
|
static size_t writes(void *ip, const uint8_t *bp, size_t n) {
|
||||||
static size_t writes(void *ip, const uint8_t *bp, size_t n) {
|
return lcdConsoleWrite((GLCDConsole *)ip, bp, n);
|
||||||
return lcdConsoleWrite((GLCDConsole *)ip, bp, n);
|
}
|
||||||
}
|
|
||||||
|
static size_t reads(void *ip, uint8_t *bp, size_t n) {
|
||||||
static size_t reads(void *ip, uint8_t *bp, size_t n) {
|
(void)ip;
|
||||||
(void)ip;
|
(void)bp;
|
||||||
(void)bp;
|
(void)n;
|
||||||
(void)n;
|
|
||||||
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
static msg_t put(void *ip, uint8_t b) {
|
||||||
static msg_t put(void *ip, uint8_t b) {
|
return lcdConsolePut((GLCDConsole *)ip, (char)b);
|
||||||
return lcdConsolePut((GLCDConsole *)ip, (char)b);
|
}
|
||||||
}
|
|
||||||
|
static msg_t get(void *ip) {
|
||||||
static msg_t get(void *ip) {
|
(void)ip;
|
||||||
(void)ip;
|
|
||||||
|
return RDY_OK;
|
||||||
return RDY_OK;
|
}
|
||||||
}
|
|
||||||
|
static msg_t putt(void *ip, uint8_t b, systime_t timeout) {
|
||||||
static msg_t putt(void *ip, uint8_t b, systime_t timeout) {
|
(void)timeout;
|
||||||
(void)timeout;
|
|
||||||
|
/* TODO: handle timeout */
|
||||||
/* TODO: handle timeout */
|
|
||||||
|
return lcdConsolePut((GLCDConsole *)ip, (char)b);
|
||||||
return lcdConsolePut((GLCDConsole *)ip, (char)b);
|
}
|
||||||
}
|
|
||||||
|
static msg_t gett(void *ip, systime_t timeout) {
|
||||||
static msg_t gett(void *ip, systime_t timeout) {
|
(void)ip;
|
||||||
(void)ip;
|
(void)timeout;
|
||||||
(void)timeout;
|
|
||||||
|
return RDY_OK;
|
||||||
return RDY_OK;
|
}
|
||||||
}
|
|
||||||
|
static size_t writet(void *ip, const uint8_t *bp, size_t n, systime_t time) {
|
||||||
static size_t writet(void *ip, const uint8_t *bp, size_t n, systime_t time) {
|
(void)time;
|
||||||
(void)time;
|
|
||||||
|
return lcdConsoleWrite((GLCDConsole *)ip, bp, n);
|
||||||
return lcdConsoleWrite((GLCDConsole *)ip, bp, n);
|
}
|
||||||
}
|
|
||||||
|
static size_t readt(void *ip, uint8_t *bp, size_t n, systime_t time) {
|
||||||
static size_t readt(void *ip, uint8_t *bp, size_t n, systime_t time) {
|
(void)ip;
|
||||||
(void)ip;
|
(void)bp;
|
||||||
(void)bp;
|
(void)n;
|
||||||
(void)n;
|
(void)time;
|
||||||
(void)time;
|
|
||||||
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
static uint16_t getflags(void *ip) {
|
||||||
static chnflags_t getflags(void *ip) {
|
_chn_get_and_clear_flags_impl(ip);
|
||||||
_chn_get_and_clear_flags_impl(ip);
|
}
|
||||||
}
|
|
||||||
|
static const struct GLCDConsoleVMT vmt = {
|
||||||
static const struct GLCDConsoleVMT vmt = {
|
writes, reads, put, get,
|
||||||
writes, reads, put, get,
|
putt, gett, writet, readt,
|
||||||
putt, gett, writet, readt,
|
getflags
|
||||||
getflags
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
msg_t lcdConsoleInit(GLCDConsole *console, uint16_t x0, uint16_t y0, uint16_t width, uint16_t height, font_t font, uint16_t bkcolor, uint16_t color) {
|
||||||
msg_t lcdConsoleInit(GLCDConsole *console, uint16_t x0, uint16_t y0, uint16_t width, uint16_t height, font_t font, uint16_t bkcolor, uint16_t color) {
|
const uint8_t* ptr;
|
||||||
const uint8_t* ptr;
|
uint16_t chi;
|
||||||
uint16_t chi;
|
uint16_t x,y;
|
||||||
uint16_t x,y;
|
|
||||||
|
console->vmt = &vmt;
|
||||||
console->vmt = &vmt;
|
/* read font, get height */
|
||||||
/* read font, get height */
|
console->fy = lcdGetFontHeight(font);
|
||||||
console->fy = font[FONT_TABLE_HEIGHT_IDX];
|
|
||||||
|
/* calculate the size of the console as an integer multiple of characters height*/
|
||||||
/* calculate the size of the console as an integer multiple of characters height*/
|
console->sx = width;
|
||||||
console->sx = width;
|
console->sy = (((int16_t)(height/console->fy))-1)*console->fy;
|
||||||
console->sy = (((int16_t)(height/console->fy))-1)*console->fy;
|
|
||||||
|
console->cx = 0;
|
||||||
console->cx = 0;
|
console->cy = 0;
|
||||||
console->cy = 0;
|
console->x0 = x0;
|
||||||
console->x0 = x0;
|
console->y0 = y0;
|
||||||
console->y0 = y0;
|
|
||||||
|
console->bkcolor = bkcolor;
|
||||||
console->bkcolor = bkcolor;
|
console->color = color;
|
||||||
console->color = color;
|
|
||||||
|
console->font = font;
|
||||||
console->font = font;
|
|
||||||
|
lcdFillArea(x0, y0, x0+width, y0+height, console->bkcolor);
|
||||||
lcdFillArea(x0, y0, x0+width, y0+height, console->bkcolor);
|
return RDY_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg_t lcdConsolePut(GLCDConsole *console, char c) {
|
msg_t lcdConsolePut(GLCDConsole *console, char c) {
|
||||||
uint8_t width;
|
uint8_t width;
|
||||||
|
|
||||||
if(c == '\n') {
|
if(c == '\n') {
|
||||||
/* clear the text at the end of the line */
|
/* clear the text at the end of the line */
|
||||||
if(console->cx < console->sx)
|
if(console->cx < console->sx)
|
||||||
lcdFillArea(console->x0 + console->cx, console->y0 + console->cy,
|
lcdFillArea(console->x0 + console->cx, console->y0 + console->cy,
|
||||||
console->x0 + console->sx, console->y0 + console->cy + console->fy,
|
console->x0 + console->sx, console->y0 + console->cy + console->fy,
|
||||||
console->bkcolor);
|
console->bkcolor);
|
||||||
console->cx = 0;
|
console->cx = 0;
|
||||||
console->cy += console->fy;
|
console->cy += console->fy;
|
||||||
} else if(c == '\r') {
|
} else if(c == '\r') {
|
||||||
/* TODO: work backwards through the buffer to the start of the current line */
|
/* TODO: work backwards through the buffer to the start of the current line */
|
||||||
//console->cx = 0;
|
//console->cx = 0;
|
||||||
} else {
|
} else {
|
||||||
width = lcdMeasureChar(c, console->font);
|
width = lcdMeasureChar(c, console->font);
|
||||||
if((console->cx + width) >= console->sx) {
|
if((console->cx + width) >= console->sx) {
|
||||||
/* clear the text at the end of the line */
|
/* clear the text at the end of the line */
|
||||||
lcdFillArea(console->x0 + console->cx, console->y0 + console->cy,
|
lcdFillArea(console->x0 + console->cx, console->y0 + console->cy,
|
||||||
console->x0 + console->cx + width, console->y0 + console->cy + console->fy,
|
console->x0 + console->cx + width, console->y0 + console->cy + console->fy,
|
||||||
console->bkcolor);
|
console->bkcolor);
|
||||||
console->cx = 0;
|
console->cx = 0;
|
||||||
console->cy += console->fy;
|
console->cy += console->fy;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((console->cy > console->sy)) {
|
if((console->cy > console->sy)) {
|
||||||
|
|
||||||
lcdVerticalScroll(console->x0, console->y0, console->x0 + console->sx,
|
lcdVerticalScroll(console->x0, console->y0, console->x0 + console->sx,
|
||||||
console->y0 + console->sy + console->fy, console->fy);
|
console->y0 + console->sy + console->fy, console->fy);
|
||||||
/* reset the cursor */
|
/* reset the cursor */
|
||||||
console->cx = 0;
|
console->cx = 0;
|
||||||
console->cy = console->sy;
|
console->cy = console->sy;
|
||||||
}
|
}
|
||||||
|
|
||||||
lcdDrawChar(console->x0 + console->cx, console->y0 + console->cy, c,
|
lcdDrawChar(console->x0 + console->cx, console->y0 + console->cy, c,
|
||||||
console->font, console->color, console->bkcolor, solid);
|
console->font, console->color, console->bkcolor, solid);
|
||||||
|
|
||||||
/* update cursor */
|
/* update cursor */
|
||||||
console->cx += width;
|
console->cx += width;
|
||||||
}
|
}
|
||||||
|
return RDY_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg_t lcdConsoleWrite(GLCDConsole *console, uint8_t *bp, size_t n) {
|
msg_t lcdConsoleWrite(GLCDConsole *console, uint8_t *bp, size_t n) {
|
||||||
size_t i;
|
size_t i;
|
||||||
for(i = 0; i < n; i++)
|
for(i = 0; i < n; i++)
|
||||||
lcdConsolePut(console, bp[i]);
|
lcdConsolePut(console, bp[i]);
|
||||||
|
|
||||||
return RDY_OK;
|
return RDY_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
767
glcd/fonts.c
767
glcd/fonts.c
|
@ -1,767 +0,0 @@
|
||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2012
|
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
|
||||||
|
|
||||||
This file is part of ChibiOS-LCD-Driver.
|
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "fonts.h"
|
|
||||||
|
|
||||||
#if 1 // font_Small - for side buttons
|
|
||||||
//
|
|
||||||
// Medium bold font, height = 11 (including the decenders)
|
|
||||||
// The font table contains 3 sections: Header, Table Of Character Indexes, Pixel data
|
|
||||||
//
|
|
||||||
// The Header contains two bytes:
|
|
||||||
// Byte0 = Font height (including decenders)
|
|
||||||
// Byte1 = Number of additional pixels that should be drawn right of char
|
|
||||||
// Byte2 = Recommended line spacing
|
|
||||||
// Byte3 = Height of decenders
|
|
||||||
// Byte4 = Unused byte
|
|
||||||
//
|
|
||||||
// The Table Of Character Indexes, is a table of 2 byte words that index to the pixel data within this table
|
|
||||||
// Word0 = Index into this table to the pixels for ASCII char 0x20
|
|
||||||
// Word1 = Index into this table to the pixels for ASCII char 0x21
|
|
||||||
// Word2 = Index into this table to the pixels for ASCII char 0x22
|
|
||||||
// ...
|
|
||||||
// Word95 = Index into this table to the pixels for ASCII char 0x7F
|
|
||||||
//
|
|
||||||
// The Pixel data table contains the bitmap for each character
|
|
||||||
// Data is written in columns of pixels, each column is 16 bits (2 bytes)
|
|
||||||
// Byte0 = width of the ASCII 0x20 character in pixels
|
|
||||||
// Byte1 = pixel data for the 0x20 char's 1st top column, bit 0 is the top pixel, bit 7 is the 8th pixel down from the top
|
|
||||||
// Byte2 = pixel data for the 0x20 char's 1st bottom column, bit 0 is the 9th pixel
|
|
||||||
// Byte5 = pixel data for the 0x20 char's 2nd top column
|
|
||||||
// Byte6 = pixel data for the 0x20 char's 2nd bottom column
|
|
||||||
// ... = remaining pairs of bytes of the columns in the 0x20 char
|
|
||||||
// ... = width of the 0x21 char in pixels
|
|
||||||
// ... = pixel data for the 0x21 char
|
|
||||||
// ...
|
|
||||||
//
|
|
||||||
const uint8_t font_Small[] = {
|
|
||||||
0x0B, 0x00, 0x0E, 0x02, 0x00,
|
|
||||||
|
|
||||||
0xC5, 0x00, 0xCE, 0x00, 0xD5, 0x00, 0xE2, 0x00, 0xF3, 0x00, 0x02, 0x01,
|
|
||||||
0x15, 0x01, 0x24, 0x01, 0x2B, 0x01, 0x34, 0x01, 0x3D, 0x01, 0x48, 0x01,
|
|
||||||
0x57, 0x01, 0x60, 0x01, 0x69, 0x01, 0x70, 0x01, 0x7D, 0x01, 0x8C, 0x01,
|
|
||||||
0x9B, 0x01, 0xAA, 0x01, 0xB9, 0x01, 0xC8, 0x01, 0xD7, 0x01, 0xE6, 0x01,
|
|
||||||
0xF5, 0x01, 0x04, 0x02, 0x13, 0x02, 0x1A, 0x02, 0x23, 0x02, 0x30, 0x02,
|
|
||||||
0x3F, 0x02, 0x4C, 0x02, 0x5B, 0x02, 0x74, 0x02, 0x85, 0x02, 0x94, 0x02,
|
|
||||||
0xA5, 0x02, 0xB6, 0x02, 0xC5, 0x02, 0xD4, 0x02, 0xE5, 0x02, 0xF6, 0x02,
|
|
||||||
0xFD, 0x02, 0x08, 0x03, 0x19, 0x03, 0x28, 0x03, 0x3B, 0x03, 0x4C, 0x03,
|
|
||||||
0x5D, 0x03, 0x6E, 0x03, 0x7F, 0x03, 0x90, 0x03, 0x9F, 0x03, 0xAE, 0x03,
|
|
||||||
0xBF, 0x03, 0xD0, 0x03, 0xE9, 0x03, 0xFA, 0x03, 0x0B, 0x04, 0x1C, 0x04,
|
|
||||||
0x25, 0x04, 0x32, 0x04, 0x3B, 0x04, 0x4A, 0x04, 0x59, 0x04, 0x62, 0x04,
|
|
||||||
0x71, 0x04, 0x80, 0x04, 0x8F, 0x04, 0x9E, 0x04, 0xAD, 0x04, 0xB6, 0x04,
|
|
||||||
0xC5, 0x04, 0xD4, 0x04, 0xDB, 0x04, 0xE2, 0x04, 0xF1, 0x04, 0xF8, 0x04,
|
|
||||||
0x0B, 0x05, 0x1A, 0x05, 0x29, 0x05, 0x38, 0x05, 0x47, 0x05, 0x50, 0x05,
|
|
||||||
0x5D, 0x05, 0x66, 0x05, 0x75, 0x05, 0x84, 0x05, 0x97, 0x05, 0xA4, 0x05,
|
|
||||||
0xB1, 0x05, 0xBE, 0x05, 0xC9, 0x05, 0xD0, 0x05, 0xDB, 0x05, 0xEC, 0x05,
|
|
||||||
|
|
||||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
|
|
||||||
0x7F, 0x01, 0x7F, 0x01, 0x06, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x44, 0x00, 0xFF, 0x01,
|
|
||||||
0xFF, 0x01, 0x44, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x44, 0x00, 0x07, 0x00,
|
|
||||||
0x00, 0x8C, 0x00, 0x9E, 0x01, 0xFF, 0x03, 0xFF, 0x03, 0xE6, 0x01, 0xC4,
|
|
||||||
0x00, 0x09, 0x00, 0x00, 0x82, 0x00, 0xC7, 0x00, 0x65, 0x00, 0xB7, 0x00,
|
|
||||||
0xDA, 0x01, 0x4C, 0x01, 0xC6, 0x01, 0x82, 0x00, 0x07, 0x00, 0x00, 0xE6,
|
|
||||||
0x00, 0xFF, 0x01, 0x3F, 0x01, 0xE6, 0x01, 0xE0, 0x01, 0x20, 0x01, 0x03,
|
|
||||||
0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0xFE, 0x03, 0xFF,
|
|
||||||
0x07, 0x01, 0x04, 0x04, 0x00, 0x00, 0x01, 0x04, 0xFF, 0x07, 0xFE, 0x03,
|
|
||||||
0x05, 0x00, 0x00, 0x0A, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0A, 0x00, 0x07,
|
|
||||||
0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0xF8, 0x00, 0xF8, 0x00, 0x20, 0x00,
|
|
||||||
0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x01, 0x04,
|
|
||||||
0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x80, 0x01, 0xE0, 0x01, 0x78, 0x00,
|
|
||||||
0x1F, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0xFE, 0x00, 0xFF, 0x01, 0x01,
|
|
||||||
0x01, 0x01, 0x01, 0xFF, 0x01, 0xFE, 0x00, 0x07, 0x00, 0x00, 0x02, 0x00,
|
|
||||||
0x02, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
|
|
||||||
0x00, 0x82, 0x01, 0xC3, 0x01, 0x61, 0x01, 0x31, 0x01, 0x1F, 0x01, 0x0E,
|
|
||||||
0x01, 0x07, 0x00, 0x00, 0x82, 0x00, 0x83, 0x01, 0x11, 0x01, 0x11, 0x01,
|
|
||||||
0xFF, 0x01, 0xEE, 0x00, 0x07, 0x00, 0x00, 0x60, 0x00, 0x78, 0x00, 0x5E,
|
|
||||||
0x00, 0xFF, 0x01, 0xFF, 0x01, 0x40, 0x00, 0x07, 0x00, 0x00, 0x9F, 0x00,
|
|
||||||
0x9F, 0x01, 0x09, 0x01, 0x09, 0x01, 0xF9, 0x01, 0xF1, 0x00, 0x07, 0x00,
|
|
||||||
0x00, 0xFE, 0x00, 0xFF, 0x01, 0x11, 0x01, 0x11, 0x01, 0xF3, 0x01, 0xE2,
|
|
||||||
0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0xC1, 0x01, 0xF1, 0x01, 0x3D, 0x00,
|
|
||||||
0x0F, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0xEE, 0x00, 0xFF, 0x01, 0x11,
|
|
||||||
0x01, 0x11, 0x01, 0xFF, 0x01, 0xEE, 0x00, 0x07, 0x00, 0x00, 0x8E, 0x00,
|
|
||||||
0x9F, 0x01, 0x11, 0x01, 0x11, 0x01, 0xFF, 0x01, 0xFE, 0x00, 0x03, 0x00,
|
|
||||||
0x00, 0x08, 0x01, 0x08, 0x01, 0x04, 0x00, 0x00, 0x00, 0x02, 0x08, 0x03,
|
|
||||||
0x08, 0x01, 0x06, 0x00, 0x00, 0x20, 0x00, 0x70, 0x00, 0xD8, 0x00, 0x8C,
|
|
||||||
0x01, 0x04, 0x01, 0x07, 0x00, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00,
|
|
||||||
0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x06, 0x00, 0x00, 0x04, 0x01, 0x8C,
|
|
||||||
0x01, 0xD8, 0x00, 0x70, 0x00, 0x20, 0x00, 0x07, 0x00, 0x00, 0x02, 0x00,
|
|
||||||
0x03, 0x00, 0x61, 0x01, 0x71, 0x01, 0x1F, 0x00, 0x0E, 0x00, 0x0C, 0x00,
|
|
||||||
0x00, 0x78, 0x00, 0xFE, 0x01, 0x86, 0x01, 0x33, 0x03, 0x79, 0x02, 0x49,
|
|
||||||
0x02, 0x79, 0x02, 0x7B, 0x02, 0x46, 0x02, 0x7E, 0x00, 0x78, 0x00, 0x08,
|
|
||||||
0x80, 0x01, 0xF0, 0x01, 0x7C, 0x00, 0x4F, 0x00, 0x4F, 0x00, 0x7C, 0x00,
|
|
||||||
0xF0, 0x01, 0x80, 0x01, 0x07, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x11,
|
|
||||||
0x01, 0x11, 0x01, 0xFF, 0x01, 0xEE, 0x00, 0x08, 0x00, 0x00, 0xFE, 0x00,
|
|
||||||
0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x83, 0x01, 0x82, 0x00,
|
|
||||||
0x08, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x83,
|
|
||||||
0x01, 0xFE, 0x00, 0x7C, 0x00, 0x07, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01,
|
|
||||||
0x11, 0x01, 0x11, 0x01, 0x11, 0x01, 0x01, 0x01, 0x07, 0x00, 0x00, 0xFF,
|
|
||||||
0x01, 0xFF, 0x01, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00, 0x01, 0x00, 0x08,
|
|
||||||
0x00, 0x00, 0xFE, 0x00, 0xFF, 0x01, 0x01, 0x01, 0x11, 0x01, 0x91, 0x01,
|
|
||||||
0xF3, 0x01, 0xF2, 0x01, 0x08, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x10,
|
|
||||||
0x00, 0x10, 0x00, 0x10, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x03, 0x00, 0x00,
|
|
||||||
0xFF, 0x01, 0xFF, 0x01, 0x05, 0xC0, 0x00, 0xC0, 0x01, 0x00, 0x01, 0xFF,
|
|
||||||
0x01, 0xFF, 0x00, 0x08, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x3C, 0x00,
|
|
||||||
0x66, 0x00, 0xC3, 0x00, 0x81, 0x01, 0x00, 0x01, 0x07, 0x00, 0x00, 0xFF,
|
|
||||||
0x01, 0xFF, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x09,
|
|
||||||
0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x3C, 0x00, 0xF0, 0x00, 0xF0, 0x00,
|
|
||||||
0x3C, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x08, 0x00, 0x00, 0xFF, 0x01, 0xFF,
|
|
||||||
0x01, 0x1E, 0x00, 0x38, 0x00, 0xE0, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x08,
|
|
||||||
0x00, 0x00, 0xFE, 0x00, 0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
||||||
0xFF, 0x01, 0xFE, 0x00, 0x08, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x11,
|
|
||||||
0x00, 0x11, 0x00, 0x11, 0x00, 0x1F, 0x00, 0x0E, 0x00, 0x08, 0x00, 0x00,
|
|
||||||
0xFE, 0x00, 0xFF, 0x01, 0x01, 0x01, 0x41, 0x01, 0xC1, 0x01, 0xFF, 0x03,
|
|
||||||
0xFE, 0x02, 0x08, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x11, 0x00, 0x11,
|
|
||||||
0x00, 0x11, 0x00, 0xFF, 0x01, 0xEE, 0x01, 0x07, 0x00, 0x00, 0x8E, 0x00,
|
|
||||||
0x9F, 0x01, 0x11, 0x01, 0x11, 0x01, 0xF3, 0x01, 0xE2, 0x00, 0x07, 0x00,
|
|
||||||
0x00, 0x01, 0x00, 0x01, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x01, 0x00, 0x01,
|
|
||||||
0x00, 0x08, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x01, 0x00, 0x01, 0x00, 0x01,
|
|
||||||
0x00, 0x01, 0xFF, 0x01, 0xFF, 0x00, 0x08, 0x03, 0x00, 0x1F, 0x00, 0x7C,
|
|
||||||
0x00, 0xE0, 0x01, 0xE0, 0x01, 0x7C, 0x00, 0x1F, 0x00, 0x03, 0x00, 0x0C,
|
|
||||||
0x03, 0x00, 0x1F, 0x00, 0x7C, 0x00, 0xE0, 0x01, 0xE0, 0x01, 0x7C, 0x00,
|
|
||||||
0x7C, 0x00, 0xE0, 0x01, 0xE0, 0x01, 0x7C, 0x00, 0x1F, 0x00, 0x03, 0x00,
|
|
||||||
0x08, 0x83, 0x01, 0xC7, 0x01, 0x6C, 0x00, 0x38, 0x00, 0x38, 0x00, 0x6C,
|
|
||||||
0x00, 0xC7, 0x01, 0x83, 0x01, 0x08, 0x03, 0x00, 0x07, 0x00, 0x0C, 0x00,
|
|
||||||
0xF8, 0x01, 0xF8, 0x01, 0x0C, 0x00, 0x07, 0x00, 0x03, 0x00, 0x08, 0x81,
|
|
||||||
0x01, 0xC1, 0x01, 0x61, 0x01, 0x31, 0x01, 0x19, 0x01, 0x0D, 0x01, 0x07,
|
|
||||||
0x01, 0x03, 0x01, 0x04, 0x00, 0x00, 0xFF, 0x07, 0xFF, 0x07, 0x01, 0x04,
|
|
||||||
0x06, 0x00, 0x00, 0x07, 0x00, 0x1F, 0x00, 0x78, 0x00, 0xE0, 0x01, 0x80,
|
|
||||||
0x01, 0x04, 0x00, 0x00, 0x01, 0x04, 0xFF, 0x07, 0xFF, 0x07, 0x07, 0x00,
|
|
||||||
0x00, 0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x03, 0x00, 0x02,
|
|
||||||
0x00, 0x07, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04,
|
|
||||||
0x00, 0x04, 0x00, 0x04, 0x04, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x02,
|
|
||||||
0x00, 0x07, 0x00, 0x00, 0xC0, 0x00, 0xE8, 0x01, 0x28, 0x01, 0x28, 0x01,
|
|
||||||
0xF8, 0x01, 0xF0, 0x01, 0x07, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x08,
|
|
||||||
0x01, 0x08, 0x01, 0xF8, 0x01, 0xF0, 0x00, 0x07, 0x00, 0x00, 0xF0, 0x00,
|
|
||||||
0xF8, 0x01, 0x08, 0x01, 0x08, 0x01, 0x98, 0x01, 0x90, 0x00, 0x07, 0x00,
|
|
||||||
0x00, 0xF0, 0x00, 0xF8, 0x01, 0x08, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFF,
|
|
||||||
0x01, 0x07, 0x00, 0x00, 0xF0, 0x00, 0xF8, 0x01, 0x28, 0x01, 0x28, 0x01,
|
|
||||||
0xB8, 0x01, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xFE, 0x01, 0xFF, 0x01, 0x09,
|
|
||||||
0x00, 0x07, 0x00, 0x00, 0xF0, 0x04, 0xF8, 0x05, 0x08, 0x05, 0x08, 0x05,
|
|
||||||
0xF8, 0x07, 0xF8, 0x03, 0x07, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x18,
|
|
||||||
0x00, 0x08, 0x00, 0xF8, 0x01, 0xF0, 0x01, 0x03, 0x00, 0x00, 0xF9, 0x01,
|
|
||||||
0xF9, 0x01, 0x03, 0x00, 0x00, 0xF9, 0x07, 0xF9, 0x07, 0x07, 0x00, 0x00,
|
|
||||||
0xFF, 0x01, 0xFF, 0x01, 0x70, 0x00, 0xD8, 0x00, 0x88, 0x01, 0x00, 0x01,
|
|
||||||
0x03, 0x00, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x09, 0x00, 0x00, 0xF8, 0x01,
|
|
||||||
0xF8, 0x01, 0x08, 0x00, 0xF8, 0x01, 0xF8, 0x01, 0x08, 0x00, 0xF8, 0x01,
|
|
||||||
0xF0, 0x01, 0x07, 0x00, 0x00, 0xF8, 0x01, 0xF8, 0x01, 0x18, 0x00, 0x08,
|
|
||||||
0x00, 0xF8, 0x01, 0xF0, 0x01, 0x07, 0x00, 0x00, 0xF0, 0x00, 0xF8, 0x01,
|
|
||||||
0x08, 0x01, 0x08, 0x01, 0xF8, 0x01, 0xF0, 0x00, 0x07, 0x00, 0x00, 0xF8,
|
|
||||||
0x07, 0xF8, 0x07, 0x08, 0x01, 0x08, 0x01, 0xF8, 0x01, 0xF0, 0x00, 0x07,
|
|
||||||
0x00, 0x00, 0xF0, 0x00, 0xF8, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF8, 0x07,
|
|
||||||
0xF8, 0x07, 0x04, 0x00, 0x00, 0xF8, 0x01, 0xF8, 0x01, 0x08, 0x00, 0x06,
|
|
||||||
0x00, 0x00, 0x90, 0x00, 0xB8, 0x01, 0x68, 0x01, 0xD8, 0x01, 0x90, 0x00,
|
|
||||||
0x04, 0x00, 0x00, 0xFE, 0x00, 0xFE, 0x01, 0x08, 0x01, 0x07, 0x00, 0x00,
|
|
||||||
0xF8, 0x00, 0xF8, 0x01, 0x00, 0x01, 0x80, 0x01, 0xF8, 0x01, 0xF8, 0x01,
|
|
||||||
0x07, 0x00, 0x00, 0x18, 0x00, 0x78, 0x00, 0xE0, 0x01, 0xE0, 0x01, 0x78,
|
|
||||||
0x00, 0x18, 0x00, 0x09, 0x00, 0x00, 0x78, 0x00, 0xF8, 0x01, 0xE0, 0x01,
|
|
||||||
0x78, 0x00, 0x78, 0x00, 0xE0, 0x01, 0xF8, 0x01, 0x78, 0x00, 0x06, 0x00,
|
|
||||||
0x00, 0x98, 0x01, 0xF8, 0x01, 0x60, 0x00, 0xF8, 0x01, 0x98, 0x01, 0x06,
|
|
||||||
0x00, 0x04, 0x78, 0x04, 0xF8, 0x07, 0x80, 0x03, 0xF8, 0x00, 0x78, 0x00,
|
|
||||||
0x06, 0x00, 0x00, 0x88, 0x01, 0xC8, 0x01, 0x68, 0x01, 0x38, 0x01, 0x18,
|
|
||||||
0x01, 0x05, 0x00, 0x00, 0x10, 0x00, 0xFF, 0x01, 0xEF, 0x03, 0x00, 0x02,
|
|
||||||
0x03, 0x00, 0x00, 0xFF, 0x03, 0xFF, 0x03, 0x05, 0x00, 0x00, 0x00, 0x02,
|
|
||||||
0xEF, 0x03, 0xFF, 0x01, 0x10, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x06,
|
|
||||||
0x00, 0x02, 0x00, 0x06, 0x00, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00, 0x04,
|
|
||||||
0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0xFE, 0x03
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 1 // font_Larger (Tahoma, 11Bold)
|
|
||||||
//
|
|
||||||
// Medium bold font, height = 11 (including the decenders)
|
|
||||||
// The font table contains 3 sections: Header, Table Of Character Indexes, Pixel data
|
|
||||||
//
|
|
||||||
// The Header contains two bytes:
|
|
||||||
// Byte0 = Font height (including decenders)
|
|
||||||
// Byte1 = Number of additional pixels that should be drawn right of char
|
|
||||||
// Byte2 = Recommended line spacing
|
|
||||||
// Byte3 = Height of decenders
|
|
||||||
// Byte4 = Unused byte
|
|
||||||
//
|
|
||||||
// The Table Of Character Indexes, is a table of 2 byte words that index to the pixel data within this table
|
|
||||||
// Word0 = Index into this table to the pixels for ASCII char 0x20
|
|
||||||
// Word1 = Index into this table to the pixels for ASCII char 0x21
|
|
||||||
// Word2 = Index into this table to the pixels for ASCII char 0x22
|
|
||||||
// ...
|
|
||||||
// Word95 = Index into this table to the pixels for ASCII char 0x7F
|
|
||||||
//
|
|
||||||
// The Pixel data table contains the bitmap for each character
|
|
||||||
// Data is written in columns of pixels, each column is 16 bits (2 bytes)
|
|
||||||
// Byte0 = width of the ASCII 0x20 character in pixels
|
|
||||||
// Byte1 = pixel data for the 0x20 char's 1st top column, bit 0 is the top pixel, bit 7 is the 8th pixel down from the top
|
|
||||||
// Byte2 = pixel data for the 0x20 char's 1st bottom column, bit 0 is the 9th pixel
|
|
||||||
// Byte5 = pixel data for the 0x20 char's 2nd top column
|
|
||||||
// Byte6 = pixel data for the 0x20 char's 2nd bottom column
|
|
||||||
// ... = remaining pairs of bytes of the columns in the 0x20 char
|
|
||||||
// ... = width of the 0x21 char in pixels
|
|
||||||
// ... = pixel data for the 0x21 char
|
|
||||||
// ...
|
|
||||||
//
|
|
||||||
const uint8_t font_Larger[] = {
|
|
||||||
0x0C, 0x01, 0x0D, 0x02, 0x00,
|
|
||||||
|
|
||||||
0xC5, 0x00, 0xCE, 0x00, 0xD5, 0x00, 0xE0, 0x00, 0xF1, 0x00, 0x00, 0x01,
|
|
||||||
0x1B, 0x01, 0x2C, 0x01, 0x31, 0x01, 0x3A, 0x01, 0x43, 0x01, 0x52, 0x01,
|
|
||||||
0x63, 0x01, 0x6A, 0x01, 0x73, 0x01, 0x7A, 0x01, 0x85, 0x01, 0x94, 0x01,
|
|
||||||
0xA3, 0x01, 0xB2, 0x01, 0xC1, 0x01, 0xD0, 0x01, 0xDF, 0x01, 0xEE, 0x01,
|
|
||||||
0xFD, 0x01, 0x0C, 0x02, 0x1B, 0x02, 0x22, 0x02, 0x29, 0x02, 0x3C, 0x02,
|
|
||||||
0x4D, 0x02, 0x60, 0x02, 0x6D, 0x02, 0x80, 0x02, 0x91, 0x02, 0xA0, 0x02,
|
|
||||||
0xAF, 0x02, 0xC0, 0x02, 0xCD, 0x02, 0xD8, 0x02, 0xE7, 0x02, 0xF8, 0x02,
|
|
||||||
0x01, 0x03, 0x0C, 0x03, 0x1B, 0x03, 0x28, 0x03, 0x3D, 0x03, 0x4C, 0x03,
|
|
||||||
0x5D, 0x03, 0x6C, 0x03, 0x7D, 0x03, 0x8E, 0x03, 0x9D, 0x03, 0xAA, 0x03,
|
|
||||||
0xB9, 0x03, 0xC8, 0x03, 0xDF, 0x03, 0xEE, 0x03, 0xFB, 0x03, 0x08, 0x04,
|
|
||||||
0x11, 0x04, 0x1C, 0x04, 0x25, 0x04, 0x38, 0x04, 0x49, 0x04, 0x54, 0x04,
|
|
||||||
0x61, 0x04, 0x70, 0x04, 0x7B, 0x04, 0x8A, 0x04, 0x97, 0x04, 0xA2, 0x04,
|
|
||||||
0xB1, 0x04, 0xC0, 0x04, 0xC5, 0x04, 0xCC, 0x04, 0xD9, 0x04, 0xDE, 0x04,
|
|
||||||
0xF3, 0x04, 0x02, 0x05, 0x11, 0x05, 0x20, 0x05, 0x2F, 0x05, 0x38, 0x05,
|
|
||||||
0x43, 0x05, 0x4E, 0x05, 0x5D, 0x05, 0x6A, 0x05, 0x7F, 0x05, 0x8C, 0x05,
|
|
||||||
0x99, 0x05, 0xA4, 0x05, 0xB1, 0x05, 0xBA, 0x05, 0xC7, 0x05, 0xDA, 0x05,
|
|
||||||
|
|
||||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
|
|
||||||
0x7E, 0x03, 0x7E, 0x03, 0x05, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07,
|
|
||||||
0x00, 0x07, 0x00, 0x08, 0xC0, 0x00, 0xD8, 0x03, 0xF8, 0x00, 0xDE, 0x00,
|
|
||||||
0xD8, 0x03, 0xF8, 0x00, 0xDE, 0x00, 0x18, 0x00, 0x07, 0x18, 0x01, 0x3C,
|
|
||||||
0x02, 0x64, 0x02, 0xFF, 0x0F, 0x64, 0x02, 0xC4, 0x03, 0x88, 0x01, 0x0D,
|
|
||||||
0x1C, 0x00, 0x3E, 0x00, 0x22, 0x00, 0x3E, 0x02, 0x1C, 0x01, 0xC0, 0x00,
|
|
||||||
0x20, 0x00, 0x18, 0x00, 0xC4, 0x01, 0xE2, 0x03, 0x20, 0x02, 0xE0, 0x03,
|
|
||||||
0xC0, 0x01, 0x08, 0xCC, 0x01, 0xFE, 0x03, 0x32, 0x02, 0x72, 0x02, 0xDE,
|
|
||||||
0x03, 0x8C, 0x01, 0xE0, 0x03, 0x60, 0x02, 0x02, 0x07, 0x00, 0x07, 0x00,
|
|
||||||
0x04, 0xF8, 0x01, 0xFE, 0x07, 0x07, 0x0E, 0x01, 0x08, 0x04, 0x01, 0x08,
|
|
||||||
0x07, 0x0E, 0xFE, 0x07, 0xF8, 0x01, 0x07, 0x00, 0x00, 0x0A, 0x00, 0x04,
|
|
||||||
0x00, 0x1F, 0x00, 0x1F, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x08, 0x00, 0x00,
|
|
||||||
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFC, 0x01, 0x20, 0x00, 0x20, 0x00,
|
|
||||||
0x20, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x07, 0x04, 0x20, 0x00,
|
|
||||||
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00,
|
|
||||||
0x03, 0x05, 0x00, 0x0C, 0x80, 0x03, 0x60, 0x00, 0x1C, 0x00, 0x03, 0x00,
|
|
||||||
0x07, 0xFC, 0x01, 0xFE, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xFE,
|
|
||||||
0x03, 0xFC, 0x01, 0x07, 0x00, 0x00, 0x04, 0x02, 0x04, 0x02, 0xFE, 0x03,
|
|
||||||
0xFE, 0x03, 0x00, 0x02, 0x00, 0x02, 0x07, 0x04, 0x02, 0x02, 0x03, 0x82,
|
|
||||||
0x03, 0xC2, 0x02, 0x62, 0x02, 0x3E, 0x02, 0x1C, 0x02, 0x07, 0x04, 0x01,
|
|
||||||
0x02, 0x02, 0x22, 0x02, 0x22, 0x02, 0x22, 0x02, 0xFE, 0x03, 0xDC, 0x01,
|
|
||||||
0x07, 0x60, 0x00, 0x50, 0x00, 0x48, 0x00, 0x44, 0x00, 0xFE, 0x03, 0xFE,
|
|
||||||
0x03, 0x40, 0x00, 0x07, 0x00, 0x01, 0x1E, 0x02, 0x1E, 0x02, 0x12, 0x02,
|
|
||||||
0x12, 0x02, 0xF2, 0x03, 0xE2, 0x01, 0x07, 0xF8, 0x01, 0xFC, 0x03, 0x16,
|
|
||||||
0x02, 0x12, 0x02, 0x12, 0x02, 0xF2, 0x03, 0xE0, 0x01, 0x07, 0x02, 0x00,
|
|
||||||
0x02, 0x00, 0x82, 0x03, 0xE2, 0x03, 0x7A, 0x00, 0x1E, 0x00, 0x06, 0x00,
|
|
||||||
0x07, 0xDC, 0x01, 0xFE, 0x03, 0x22, 0x02, 0x22, 0x02, 0x22, 0x02, 0xFE,
|
|
||||||
0x03, 0xDC, 0x01, 0x07, 0x3C, 0x00, 0x7E, 0x02, 0x42, 0x02, 0x42, 0x02,
|
|
||||||
0x42, 0x03, 0xFE, 0x01, 0xFC, 0x00, 0x03, 0x00, 0x00, 0x18, 0x03, 0x18,
|
|
||||||
0x03, 0x03, 0x00, 0x00, 0x18, 0x0F, 0x18, 0x07, 0x09, 0x00, 0x00, 0x60,
|
|
||||||
0x00, 0x60, 0x00, 0x90, 0x00, 0x90, 0x00, 0x08, 0x01, 0x08, 0x01, 0x04,
|
|
||||||
0x02, 0x04, 0x02, 0x08, 0x00, 0x00, 0x90, 0x00, 0x90, 0x00, 0x90, 0x00,
|
|
||||||
0x90, 0x00, 0x90, 0x00, 0x90, 0x00, 0x90, 0x00, 0x09, 0x00, 0x00, 0x04,
|
|
||||||
0x02, 0x04, 0x02, 0x08, 0x01, 0x08, 0x01, 0x90, 0x00, 0x90, 0x00, 0x60,
|
|
||||||
0x00, 0x60, 0x00, 0x06, 0x04, 0x00, 0x02, 0x00, 0x62, 0x03, 0x72, 0x03,
|
|
||||||
0x1E, 0x00, 0x0C, 0x00, 0x09, 0xF8, 0x01, 0x04, 0x02, 0xF2, 0x04, 0xFA,
|
|
||||||
0x05, 0x0A, 0x05, 0xFA, 0x04, 0xFA, 0x05, 0x04, 0x01, 0xF8, 0x00, 0x08,
|
|
||||||
0x80, 0x03, 0xF0, 0x03, 0xFC, 0x00, 0x8E, 0x00, 0x8E, 0x00, 0xFC, 0x00,
|
|
||||||
0xF0, 0x03, 0x80, 0x03, 0x07, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x02, 0x22,
|
|
||||||
0x02, 0x22, 0x02, 0xFE, 0x03, 0xDC, 0x01, 0x07, 0xFC, 0x01, 0xFE, 0x03,
|
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x8C, 0x01, 0x08, 0xFE,
|
|
||||||
0x03, 0xFE, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x06, 0x03, 0xFC,
|
|
||||||
0x01, 0xF8, 0x00, 0x06, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x02, 0x22, 0x02,
|
|
||||||
0x22, 0x02, 0x22, 0x02, 0x05, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x00, 0x22,
|
|
||||||
0x00, 0x22, 0x00, 0x07, 0xFC, 0x01, 0xFE, 0x03, 0x02, 0x02, 0x02, 0x02,
|
|
||||||
0x22, 0x02, 0xE2, 0x03, 0xEC, 0x03, 0x08, 0xFE, 0x03, 0xFE, 0x03, 0x20,
|
|
||||||
0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x04,
|
|
||||||
0x02, 0x02, 0xFE, 0x03, 0xFE, 0x03, 0x02, 0x02, 0x05, 0x00, 0x02, 0x02,
|
|
||||||
0x02, 0x02, 0x02, 0xFE, 0x03, 0xFE, 0x01, 0x07, 0xFE, 0x03, 0xFE, 0x03,
|
|
||||||
0x70, 0x00, 0xD8, 0x00, 0x8C, 0x01, 0x06, 0x03, 0x02, 0x02, 0x06, 0xFE,
|
|
||||||
0x03, 0xFE, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x0A,
|
|
||||||
0xFE, 0x03, 0x0E, 0x00, 0x1C, 0x00, 0x38, 0x00, 0x70, 0x00, 0x30, 0x00,
|
|
||||||
0x18, 0x00, 0x0C, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x07, 0xFE, 0x03, 0x0E,
|
|
||||||
0x00, 0x1C, 0x00, 0x70, 0x00, 0xE0, 0x01, 0x80, 0x03, 0xFE, 0x03, 0x08,
|
|
||||||
0xFC, 0x01, 0xFE, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
|
||||||
0xFE, 0x03, 0xFC, 0x01, 0x07, 0xFE, 0x03, 0xFE, 0x03, 0x42, 0x00, 0x42,
|
|
||||||
0x00, 0x42, 0x00, 0x7E, 0x00, 0x3C, 0x00, 0x08, 0xFC, 0x01, 0xFE, 0x03,
|
|
||||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x06, 0x02, 0x0E, 0xFE, 0x0B, 0xFC, 0x09,
|
|
||||||
0x08, 0xFE, 0x03, 0xFE, 0x03, 0x22, 0x00, 0x62, 0x00, 0xE2, 0x00, 0xBE,
|
|
||||||
0x01, 0x1C, 0x03, 0x00, 0x02, 0x07, 0x9C, 0x01, 0x3E, 0x02, 0x22, 0x02,
|
|
||||||
0x22, 0x02, 0x22, 0x02, 0xE2, 0x03, 0xCC, 0x01, 0x06, 0x02, 0x00, 0x02,
|
|
||||||
0x00, 0xFE, 0x03, 0xFE, 0x03, 0x02, 0x00, 0x02, 0x00, 0x07, 0xFE, 0x01,
|
|
||||||
0xFE, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xFE, 0x03, 0xFE, 0x01,
|
|
||||||
0x07, 0x0E, 0x00, 0x7E, 0x00, 0xF0, 0x03, 0x80, 0x03, 0xF0, 0x03, 0x7E,
|
|
||||||
0x00, 0x0E, 0x00, 0x0B, 0x1E, 0x00, 0xFE, 0x00, 0xE0, 0x03, 0xE0, 0x03,
|
|
||||||
0xFC, 0x00, 0x0E, 0x00, 0xFC, 0x00, 0xE0, 0x03, 0xE0, 0x03, 0xFE, 0x00,
|
|
||||||
0x1E, 0x00, 0x07, 0x06, 0x03, 0x8E, 0x03, 0xF8, 0x00, 0x70, 0x00, 0xF8,
|
|
||||||
0x00, 0x8E, 0x03, 0x06, 0x03, 0x06, 0x0E, 0x00, 0x3E, 0x00, 0xF0, 0x03,
|
|
||||||
0xF0, 0x03, 0x3E, 0x00, 0x0E, 0x00, 0x06, 0x82, 0x03, 0xC2, 0x03, 0x62,
|
|
||||||
0x02, 0x32, 0x02, 0x1E, 0x02, 0x0E, 0x02, 0x04, 0xFF, 0x0F, 0xFF, 0x0F,
|
|
||||||
0x01, 0x08, 0x01, 0x08, 0x05, 0x03, 0x00, 0x1C, 0x00, 0x60, 0x00, 0x80,
|
|
||||||
0x03, 0x00, 0x0C, 0x04, 0x01, 0x08, 0x01, 0x08, 0xFF, 0x0F, 0xFF, 0x0F,
|
|
||||||
0x09, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x04, 0x00, 0x02, 0x00, 0x02,
|
|
||||||
0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,
|
|
||||||
0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,
|
|
||||||
0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0x06,
|
|
||||||
0x80, 0x01, 0xD0, 0x03, 0x48, 0x02, 0x48, 0x02, 0xF8, 0x03, 0xF0, 0x03,
|
|
||||||
0x07, 0xFF, 0x03, 0xFF, 0x03, 0x10, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF8,
|
|
||||||
0x03, 0xF0, 0x01, 0x05, 0xF0, 0x01, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02,
|
|
||||||
0x08, 0x02, 0x07, 0xF0, 0x01, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x08,
|
|
||||||
0x01, 0xFF, 0x03, 0xFF, 0x03, 0x06, 0xF0, 0x01, 0xF8, 0x03, 0x48, 0x02,
|
|
||||||
0x48, 0x02, 0x78, 0x02, 0x70, 0x01, 0x05, 0x08, 0x00, 0xFE, 0x03, 0xFF,
|
|
||||||
0x03, 0x09, 0x00, 0x01, 0x00, 0x07, 0xF0, 0x01, 0xF8, 0x0B, 0x08, 0x0A,
|
|
||||||
0x08, 0x0A, 0x08, 0x09, 0xF8, 0x0F, 0xF8, 0x07, 0x07, 0xFF, 0x03, 0xFF,
|
|
||||||
0x03, 0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0xF0, 0x03, 0x02,
|
|
||||||
0xFA, 0x03, 0xFA, 0x03, 0x03, 0x08, 0x08, 0xFA, 0x0F, 0xFA, 0x07, 0x06,
|
|
||||||
0xFF, 0x03, 0xFF, 0x03, 0xE0, 0x00, 0xB0, 0x01, 0x18, 0x03, 0x08, 0x02,
|
|
||||||
0x02, 0xFF, 0x03, 0xFF, 0x03, 0x0A, 0xF8, 0x03, 0xF8, 0x03, 0x08, 0x00,
|
|
||||||
0x08, 0x00, 0xF8, 0x03, 0xF0, 0x03, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03,
|
|
||||||
0xF0, 0x03, 0x07, 0xF8, 0x03, 0xF8, 0x03, 0x10, 0x00, 0x08, 0x00, 0x08,
|
|
||||||
0x00, 0xF8, 0x03, 0xF0, 0x03, 0x07, 0xF0, 0x01, 0xF8, 0x03, 0x08, 0x02,
|
|
||||||
0x08, 0x02, 0x08, 0x02, 0xF8, 0x03, 0xF0, 0x01, 0x07, 0xF8, 0x0F, 0xF8,
|
|
||||||
0x0F, 0x10, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF8, 0x03, 0xF0, 0x01, 0x07,
|
|
||||||
0xF0, 0x01, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x08, 0x01, 0xF8, 0x0F,
|
|
||||||
0xF8, 0x0F, 0x04, 0xF8, 0x03, 0xF8, 0x03, 0x10, 0x00, 0x18, 0x00, 0x05,
|
|
||||||
0x30, 0x01, 0x78, 0x02, 0x48, 0x02, 0xC8, 0x03, 0x90, 0x01, 0x05, 0x08,
|
|
||||||
0x00, 0xFE, 0x01, 0xFE, 0x03, 0x08, 0x02, 0x08, 0x02, 0x07, 0xF8, 0x01,
|
|
||||||
0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0xF8, 0x03, 0xF8, 0x03,
|
|
||||||
0x06, 0x38, 0x00, 0xF8, 0x00, 0xC0, 0x03, 0xC0, 0x03, 0xF8, 0x00, 0x38,
|
|
||||||
0x00, 0x0A, 0x18, 0x00, 0xF8, 0x00, 0xE0, 0x03, 0x80, 0x03, 0xF8, 0x00,
|
|
||||||
0xF8, 0x00, 0x80, 0x03, 0xE0, 0x03, 0xF8, 0x00, 0x18, 0x00, 0x06, 0x18,
|
|
||||||
0x03, 0xB8, 0x03, 0xE0, 0x00, 0xE0, 0x00, 0xB8, 0x03, 0x18, 0x03, 0x06,
|
|
||||||
0x38, 0x00, 0xF8, 0x0C, 0xC0, 0x0F, 0xC0, 0x03, 0xF8, 0x00, 0x38, 0x00,
|
|
||||||
0x05, 0x88, 0x03, 0xC8, 0x03, 0x68, 0x02, 0x38, 0x02, 0x18, 0x02, 0x06,
|
|
||||||
0x20, 0x00, 0x20, 0x00, 0xFE, 0x07, 0xDF, 0x0F, 0x01, 0x08, 0x01, 0x08,
|
|
||||||
0x04, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0xFF, 0x0F, 0x06, 0x01, 0x08,
|
|
||||||
0x01, 0x08, 0xDF, 0x0F, 0xFE, 0x07, 0x20, 0x00, 0x20, 0x00, 0x09, 0xE0,
|
|
||||||
0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x00, 0xC0,
|
|
||||||
0x00, 0xC0, 0x00, 0x70, 0x00, 0x06, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03,
|
|
||||||
0x02, 0x02, 0xFE, 0x03, 0xFE, 0x03
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 1 // font_MediumBold (UI Font)
|
|
||||||
// The font table contains 3 sections: Header, Table Of Character Indexes, Pixel data
|
|
||||||
//
|
|
||||||
// The Header contains two bytes:
|
|
||||||
// Byte0 = Font height (including decenders)
|
|
||||||
// Byte1 = Number of additional pixels that should be drawn right of char
|
|
||||||
// Byte2 = Recommended line spacing
|
|
||||||
// Byte3 = Height of decenders
|
|
||||||
// Byte4 = Unused byte
|
|
||||||
//
|
|
||||||
// The Table Of Character Indexes, is a table of 2 byte words that index to the pixel data within this table
|
|
||||||
// Word0 = Index into this table to the pixels for ASCII char 0x20
|
|
||||||
// Word1 = Index into this table to the pixels for ASCII char 0x21
|
|
||||||
// Word2 = Index into this table to the pixels for ASCII char 0x22
|
|
||||||
// ...
|
|
||||||
// Word95 = Index into this table to the pixels for ASCII char 0x7F
|
|
||||||
//
|
|
||||||
// The Pixel data table contains the bitmap for each character
|
|
||||||
// Data is written in columns of pixels, each column is 16 bits (2 bytes)
|
|
||||||
// Byte0 = width of the ASCII 0x20 character in pixels
|
|
||||||
// Byte1 = pixel data for the 0x20 char's 1st top column, bit 0 is the top pixel, bit 7 is the 8th pixel down from the top
|
|
||||||
// Byte2 = pixel data for the 0x20 char's 1st bottom column, bit 0 is the 9th pixel
|
|
||||||
// Byte5 = pixel data for the 0x20 char's 2nd top column
|
|
||||||
// Byte6 = pixel data for the 0x20 char's 2nd bottom column
|
|
||||||
// ... = remaining pairs of bytes of the columns in the 0x20 char
|
|
||||||
// ... = width of the 0x21 char in pixels
|
|
||||||
// ... = pixel data for the 0x21 char
|
|
||||||
// ...
|
|
||||||
//
|
|
||||||
const uint8_t font_MediumBold[] = {
|
|
||||||
0x0D, 0x00, 0x0F, 0x02, 0x00,
|
|
||||||
|
|
||||||
0xC5, 0x00, 0xD2, 0x00, 0xD9, 0x00, 0xE6, 0x00, 0xF7, 0x00, 0x06, 0x01,
|
|
||||||
0x21, 0x01, 0x34, 0x01, 0x3B, 0x01, 0x46, 0x01, 0x51, 0x01, 0x5E, 0x01,
|
|
||||||
0x6F, 0x01, 0x76, 0x01, 0x81, 0x01, 0x88, 0x01, 0x97, 0x01, 0xA6, 0x01,
|
|
||||||
0xB5, 0x01, 0xC4, 0x01, 0xD3, 0x01, 0xE2, 0x01, 0xF1, 0x01, 0x00, 0x02,
|
|
||||||
0x0F, 0x02, 0x1E, 0x02, 0x2D, 0x02, 0x34, 0x02, 0x3B, 0x02, 0x4C, 0x02,
|
|
||||||
0x5D, 0x02, 0x6E, 0x02, 0x7B, 0x02, 0x90, 0x02, 0xA1, 0x02, 0xB0, 0x02,
|
|
||||||
0xBF, 0x02, 0xD0, 0x02, 0xDF, 0x02, 0xEE, 0x02, 0xFF, 0x02, 0x10, 0x03,
|
|
||||||
0x1B, 0x03, 0x26, 0x03, 0x35, 0x03, 0x44, 0x03, 0x57, 0x03, 0x68, 0x03,
|
|
||||||
0x79, 0x03, 0x88, 0x03, 0x99, 0x03, 0xAA, 0x03, 0xB9, 0x03, 0xCA, 0x03,
|
|
||||||
0xDB, 0x03, 0xEA, 0x03, 0x01, 0x04, 0x10, 0x04, 0x1F, 0x04, 0x2E, 0x04,
|
|
||||||
0x39, 0x04, 0x48, 0x04, 0x53, 0x04, 0x66, 0x04, 0x77, 0x04, 0x82, 0x04,
|
|
||||||
0x91, 0x04, 0xA0, 0x04, 0xAD, 0x04, 0xBC, 0x04, 0xCB, 0x04, 0xD6, 0x04,
|
|
||||||
0xE5, 0x04, 0xF4, 0x04, 0xFB, 0x04, 0x04, 0x05, 0x13, 0x05, 0x1A, 0x05,
|
|
||||||
0x31, 0x05, 0x40, 0x05, 0x4F, 0x05, 0x5E, 0x05, 0x6D, 0x05, 0x7A, 0x05,
|
|
||||||
0x87, 0x05, 0x92, 0x05, 0xA1, 0x05, 0xB0, 0x05, 0xC3, 0x05, 0xD2, 0x05,
|
|
||||||
0xE1, 0x05, 0xEE, 0x05, 0xFD, 0x05, 0x06, 0x06, 0x15, 0x06, 0x26, 0x06,
|
|
||||||
|
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x03, 0x00, 0x00, 0xFC, 0x02, 0xFC, 0x02, 0x06, 0x00, 0x00, 0x0E,
|
|
||||||
0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x08, 0x00, 0x00,
|
|
||||||
0x80, 0x00, 0x90, 0x03, 0xF0, 0x00, 0x9C, 0x03, 0xF0, 0x00, 0x9C, 0x00,
|
|
||||||
0x10, 0x00, 0x07, 0x00, 0x00, 0x30, 0x01, 0x78, 0x02, 0xC8, 0x0F, 0x7E,
|
|
||||||
0x02, 0xC8, 0x03, 0x90, 0x01, 0x0D, 0x00, 0x00, 0x38, 0x00, 0x7C, 0x00,
|
|
||||||
0x44, 0x00, 0x7C, 0x00, 0x38, 0x03, 0xC0, 0x00, 0x30, 0x00, 0xCC, 0x01,
|
|
||||||
0xE0, 0x03, 0x20, 0x02, 0xE0, 0x03, 0xC0, 0x01, 0x09, 0x00, 0x00, 0xD8,
|
|
||||||
0x01, 0xFC, 0x03, 0x24, 0x02, 0x7C, 0x02, 0xD8, 0x02, 0x80, 0x01, 0x60,
|
|
||||||
0x03, 0x20, 0x02, 0x03, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x05, 0x00,
|
|
||||||
0x00, 0xF0, 0x01, 0xFC, 0x07, 0x0E, 0x0E, 0x02, 0x08, 0x05, 0x00, 0x00,
|
|
||||||
0x02, 0x08, 0x0E, 0x0E, 0xFC, 0x07, 0xF0, 0x01, 0x06, 0x00, 0x00, 0x14,
|
|
||||||
0x00, 0x08, 0x00, 0x3E, 0x00, 0x08, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00,
|
|
||||||
0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00,
|
|
||||||
0x40, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x07, 0x05, 0x00, 0x00,
|
|
||||||
0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x03, 0x00, 0x00, 0x00,
|
|
||||||
0x03, 0x00, 0x03, 0x07, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x0F, 0xE0, 0x03,
|
|
||||||
0xF8, 0x00, 0x1E, 0x00, 0x06, 0x00, 0x07, 0x00, 0x00, 0xF8, 0x01, 0xFC,
|
|
||||||
0x03, 0x04, 0x02, 0x04, 0x02, 0xFC, 0x03, 0xF8, 0x01, 0x07, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x08, 0x02, 0xFC, 0x03, 0xFC, 0x03, 0x00, 0x02, 0x00, 0x00,
|
|
||||||
0x07, 0x00, 0x00, 0x08, 0x03, 0x8C, 0x03, 0xC4, 0x02, 0x64, 0x02, 0x3C,
|
|
||||||
0x02, 0x18, 0x02, 0x07, 0x00, 0x00, 0x08, 0x01, 0x0C, 0x03, 0x24, 0x02,
|
|
||||||
0x24, 0x02, 0xFC, 0x03, 0xD8, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x00, 0xA0,
|
|
||||||
0x00, 0x90, 0x00, 0xF8, 0x03, 0xFC, 0x03, 0x80, 0x00, 0x07, 0x00, 0x00,
|
|
||||||
0x00, 0x01, 0x3C, 0x03, 0x3C, 0x02, 0x24, 0x02, 0xE4, 0x03, 0xC4, 0x01,
|
|
||||||
0x07, 0x00, 0x00, 0xF0, 0x01, 0xF8, 0x03, 0x2C, 0x02, 0x24, 0x02, 0xE4,
|
|
||||||
0x03, 0xC0, 0x01, 0x07, 0x00, 0x00, 0x04, 0x00, 0x04, 0x03, 0xC4, 0x03,
|
|
||||||
0xF4, 0x00, 0x3C, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x00, 0xD8, 0x01, 0xFC,
|
|
||||||
0x03, 0x24, 0x02, 0x24, 0x02, 0xFC, 0x03, 0xD8, 0x01, 0x07, 0x00, 0x00,
|
|
||||||
0x38, 0x00, 0x7C, 0x02, 0x44, 0x02, 0x44, 0x03, 0xFC, 0x01, 0xF8, 0x00,
|
|
||||||
0x03, 0x00, 0x00, 0x30, 0x03, 0x30, 0x03, 0x03, 0x00, 0x00, 0x30, 0x0F,
|
|
||||||
0x30, 0x07, 0x08, 0x00, 0x00, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10,
|
|
||||||
0x01, 0x10, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x00, 0x00, 0x90, 0x00,
|
|
||||||
0x90, 0x00, 0x90, 0x00, 0x90, 0x00, 0x90, 0x00, 0x90, 0x00, 0x90, 0x00,
|
|
||||||
0x08, 0x00, 0x00, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, 0x10, 0x01, 0xA0,
|
|
||||||
0x00, 0xA0, 0x00, 0x40, 0x00, 0x06, 0x00, 0x00, 0x08, 0x00, 0xC4, 0x02,
|
|
||||||
0xE4, 0x02, 0x3C, 0x00, 0x18, 0x00, 0x0A, 0x00, 0x00, 0xF0, 0x01, 0x08,
|
|
||||||
0x02, 0xE4, 0x04, 0xF4, 0x05, 0x14, 0x05, 0xF4, 0x05, 0xF4, 0x05, 0x04,
|
|
||||||
0x01, 0xF8, 0x00, 0x08, 0x00, 0x00, 0x80, 0x03, 0xF0, 0x03, 0xFC, 0x00,
|
|
||||||
0x8C, 0x00, 0xFC, 0x00, 0xF0, 0x03, 0x80, 0x03, 0x07, 0x00, 0x00, 0xFC,
|
|
||||||
0x03, 0xFC, 0x03, 0x24, 0x02, 0x24, 0x02, 0xFC, 0x03, 0xD8, 0x01, 0x07,
|
|
||||||
0x00, 0x00, 0xF8, 0x01, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
|
|
||||||
0x08, 0x01, 0x08, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x04, 0x02, 0x04,
|
|
||||||
0x02, 0x0C, 0x03, 0xF8, 0x01, 0xF0, 0x00, 0x07, 0x00, 0x00, 0xFC, 0x03,
|
|
||||||
0xFC, 0x03, 0x24, 0x02, 0x24, 0x02, 0x24, 0x02, 0x24, 0x02, 0x07, 0x00,
|
|
||||||
0x00, 0xFC, 0x03, 0xFC, 0x03, 0x24, 0x00, 0x24, 0x00, 0x24, 0x00, 0x24,
|
|
||||||
0x00, 0x08, 0x00, 0x00, 0xF8, 0x01, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02,
|
|
||||||
0x44, 0x02, 0xC4, 0x03, 0xC8, 0x03, 0x08, 0x00, 0x00, 0xFC, 0x03, 0xFC,
|
|
||||||
0x03, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x05,
|
|
||||||
0x00, 0x00, 0x04, 0x02, 0xFC, 0x03, 0xFC, 0x03, 0x04, 0x02, 0x05, 0x00,
|
|
||||||
0x02, 0x04, 0x02, 0x04, 0x02, 0xFC, 0x03, 0xFC, 0x01, 0x07, 0x00, 0x00,
|
|
||||||
0xFC, 0x03, 0xFC, 0x03, 0xF0, 0x00, 0x98, 0x01, 0x0C, 0x03, 0x04, 0x02,
|
|
||||||
0x07, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00,
|
|
||||||
0x02, 0x00, 0x02, 0x09, 0x00, 0x00, 0xFC, 0x03, 0x1C, 0x00, 0x38, 0x00,
|
|
||||||
0x70, 0x00, 0x20, 0x00, 0x10, 0x00, 0xF8, 0x03, 0xFC, 0x03, 0x08, 0x00,
|
|
||||||
0x00, 0xFC, 0x03, 0x18, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x00, 0x80,
|
|
||||||
0x01, 0xFC, 0x03, 0x08, 0x00, 0x00, 0xF8, 0x01, 0xFC, 0x03, 0x04, 0x02,
|
|
||||||
0x04, 0x02, 0x04, 0x02, 0xFC, 0x03, 0xF8, 0x01, 0x07, 0x00, 0x00, 0xFC,
|
|
||||||
0x03, 0xFC, 0x03, 0x44, 0x00, 0x44, 0x00, 0x7C, 0x00, 0x38, 0x00, 0x08,
|
|
||||||
0x00, 0x00, 0xF8, 0x01, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x06, 0x04, 0x0E,
|
|
||||||
0xFC, 0x0B, 0xF8, 0x09, 0x08, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x44,
|
|
||||||
0x00, 0xC4, 0x00, 0xFC, 0x01, 0x38, 0x03, 0x00, 0x02, 0x07, 0x00, 0x00,
|
|
||||||
0x38, 0x01, 0x7C, 0x02, 0x64, 0x02, 0x64, 0x02, 0xE4, 0x03, 0xC8, 0x01,
|
|
||||||
0x08, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x04,
|
|
||||||
0x00, 0x04, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0xFC, 0x01, 0xFC, 0x03,
|
|
||||||
0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xFC, 0x03, 0xFC, 0x01, 0x07, 0x00,
|
|
||||||
0x00, 0x1C, 0x00, 0xFC, 0x00, 0xE0, 0x03, 0xE0, 0x03, 0xFC, 0x00, 0x1C,
|
|
||||||
0x00, 0x0B, 0x00, 0x00, 0x1C, 0x00, 0xFC, 0x00, 0xE0, 0x03, 0xC0, 0x03,
|
|
||||||
0x7C, 0x00, 0x7C, 0x00, 0xC0, 0x03, 0xE0, 0x03, 0xFC, 0x00, 0x1C, 0x00,
|
|
||||||
0x07, 0x00, 0x00, 0x0C, 0x03, 0x9C, 0x03, 0xF0, 0x00, 0xF0, 0x00, 0x9C,
|
|
||||||
0x03, 0x0C, 0x03, 0x07, 0x00, 0x00, 0x0C, 0x00, 0x3C, 0x00, 0xF0, 0x03,
|
|
||||||
0xF0, 0x03, 0x3C, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x00, 0x84, 0x03, 0xC4,
|
|
||||||
0x03, 0xE4, 0x02, 0x74, 0x02, 0x3C, 0x02, 0x1C, 0x02, 0x05, 0x00, 0x00,
|
|
||||||
0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x02, 0x08, 0x07, 0x00, 0x00, 0x06,
|
|
||||||
0x00, 0x1E, 0x00, 0xF8, 0x00, 0xE0, 0x03, 0x00, 0x0F, 0x00, 0x0C, 0x05,
|
|
||||||
0x00, 0x00, 0x02, 0x08, 0x02, 0x08, 0xFE, 0x0F, 0xFE, 0x0F, 0x09, 0x00,
|
|
||||||
0x00, 0x20, 0x00, 0x30, 0x00, 0x18, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x18,
|
|
||||||
0x00, 0x30, 0x00, 0x20, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,
|
|
||||||
0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x05, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00,
|
|
||||||
0x80, 0x01, 0xD0, 0x03, 0x50, 0x02, 0x50, 0x02, 0xF0, 0x03, 0xE0, 0x03,
|
|
||||||
0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x10, 0x02, 0x10, 0x02, 0xF0,
|
|
||||||
0x03, 0xE0, 0x01, 0x06, 0x00, 0x00, 0xE0, 0x01, 0xF0, 0x03, 0x10, 0x02,
|
|
||||||
0x10, 0x02, 0x10, 0x02, 0x07, 0x00, 0x00, 0xE0, 0x01, 0xF0, 0x03, 0x10,
|
|
||||||
0x02, 0x10, 0x02, 0xFE, 0x03, 0xFE, 0x03, 0x07, 0x00, 0x00, 0xE0, 0x01,
|
|
||||||
0xF0, 0x03, 0x50, 0x02, 0x50, 0x02, 0x70, 0x02, 0x60, 0x01, 0x05, 0x10,
|
|
||||||
0x00, 0xFC, 0x03, 0xFE, 0x03, 0x12, 0x00, 0x12, 0x00, 0x07, 0x00, 0x00,
|
|
||||||
0xE0, 0x01, 0xF0, 0x0B, 0x10, 0x0A, 0x10, 0x0A, 0xF0, 0x0F, 0xF0, 0x07,
|
|
||||||
0x07, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x03, 0x10, 0x00, 0x10, 0x00, 0xF0,
|
|
||||||
0x03, 0xE0, 0x03, 0x03, 0x00, 0x00, 0xF4, 0x03, 0xF4, 0x03, 0x04, 0x00,
|
|
||||||
0x08, 0x10, 0x08, 0xF4, 0x0F, 0xF4, 0x07, 0x07, 0x00, 0x00, 0xFE, 0x03,
|
|
||||||
0xFE, 0x03, 0xC0, 0x00, 0xE0, 0x01, 0x30, 0x03, 0x10, 0x02, 0x03, 0x00,
|
|
||||||
0x00, 0xFE, 0x03, 0xFE, 0x03, 0x0B, 0x00, 0x00, 0xF0, 0x03, 0xF0, 0x03,
|
|
||||||
0x10, 0x00, 0x10, 0x00, 0xF0, 0x03, 0xE0, 0x03, 0x10, 0x00, 0x10, 0x00,
|
|
||||||
0xF0, 0x03, 0xE0, 0x03, 0x07, 0x00, 0x00, 0xF0, 0x03, 0xF0, 0x03, 0x10,
|
|
||||||
0x00, 0x10, 0x00, 0xF0, 0x03, 0xE0, 0x03, 0x07, 0x00, 0x00, 0xE0, 0x01,
|
|
||||||
0xF0, 0x03, 0x10, 0x02, 0x10, 0x02, 0xF0, 0x03, 0xE0, 0x01, 0x07, 0x00,
|
|
||||||
0x00, 0xF0, 0x0F, 0xF0, 0x0F, 0x10, 0x02, 0x10, 0x02, 0xF0, 0x03, 0xE0,
|
|
||||||
0x01, 0x07, 0x00, 0x00, 0xE0, 0x01, 0xF0, 0x03, 0x10, 0x02, 0x10, 0x02,
|
|
||||||
0xF0, 0x0F, 0xF0, 0x0F, 0x06, 0x00, 0x00, 0xF0, 0x03, 0xF0, 0x03, 0x20,
|
|
||||||
0x00, 0x30, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x60, 0x02, 0xF0, 0x02,
|
|
||||||
0xD0, 0x02, 0xD0, 0x03, 0x90, 0x01, 0x05, 0x10, 0x00, 0xFC, 0x01, 0xFC,
|
|
||||||
0x03, 0x10, 0x02, 0x10, 0x02, 0x07, 0x00, 0x00, 0xF0, 0x01, 0xF0, 0x03,
|
|
||||||
0x00, 0x02, 0x00, 0x02, 0xF0, 0x03, 0xF0, 0x03, 0x07, 0x00, 0x00, 0x70,
|
|
||||||
0x00, 0xF0, 0x01, 0x80, 0x03, 0x80, 0x03, 0xF0, 0x01, 0x70, 0x00, 0x09,
|
|
||||||
0x00, 0x00, 0xF0, 0x00, 0xF0, 0x03, 0x00, 0x03, 0xF0, 0x00, 0xF0, 0x00,
|
|
||||||
0x00, 0x03, 0xF0, 0x03, 0xF0, 0x00, 0x07, 0x00, 0x00, 0x30, 0x03, 0xF0,
|
|
||||||
0x03, 0xC0, 0x00, 0xC0, 0x00, 0xF0, 0x03, 0x30, 0x03, 0x07, 0x00, 0x00,
|
|
||||||
0x30, 0x00, 0xF0, 0x0C, 0xC0, 0x0F, 0xC0, 0x03, 0xF0, 0x00, 0x30, 0x00,
|
|
||||||
0x06, 0x00, 0x00, 0x10, 0x03, 0x90, 0x03, 0xD0, 0x02, 0x70, 0x02, 0x30,
|
|
||||||
0x02, 0x07, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0xFC, 0x07, 0xBE, 0x0F,
|
|
||||||
0x02, 0x08, 0x02, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0xFE,
|
|
||||||
0x0F, 0x07, 0x00, 0x00, 0x02, 0x08, 0x02, 0x08, 0xBE, 0x0F, 0xFC, 0x07,
|
|
||||||
0x40, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00, 0xC0, 0x01, 0x20, 0x00, 0x20,
|
|
||||||
0x00, 0xC0, 0x00, 0x00, 0x01, 0x00, 0x01, 0xE0, 0x00, 0x04, 0xFC, 0x03,
|
|
||||||
0xFC, 0x03, 0xFC, 0x03, 0xFC, 0x03
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 // font_MediumBold (UI Font Option 2)
|
|
||||||
//
|
|
||||||
// Font table for Tahoma font, height = 11 (including the decenders)
|
|
||||||
// The font table contains 3 sections: Header, Table Of Character Indexes, Pixel data
|
|
||||||
//
|
|
||||||
// The Header contains two bytes:
|
|
||||||
// Byte0 = Font height (including decenders)
|
|
||||||
// Byte1 = Number of additional pixels that should be drawn right of char
|
|
||||||
// Byte2 = Recommended line spacing
|
|
||||||
// Byte3 = Height of decenders
|
|
||||||
// Byte4 = Unused byte
|
|
||||||
//
|
|
||||||
// The Table Of Character Indexes, is a table of 2 byte words that index to the pixel data within this table
|
|
||||||
// Word0 = Index into this table to the pixels for ASCII char 0x20
|
|
||||||
// Word1 = Index into this table to the pixels for ASCII char 0x21
|
|
||||||
// Word2 = Index into this table to the pixels for ASCII char 0x22
|
|
||||||
// ...
|
|
||||||
// Word95 = Index into this table to the pixels for ASCII char 0x7F
|
|
||||||
//
|
|
||||||
// The Pixel data table contains the bitmap for each character
|
|
||||||
// Data is written in columns of pixels, each column is 16 bits (2 bytes)
|
|
||||||
// Byte0 = width of the ASCII 0x20 character in pixels
|
|
||||||
// Byte1 = pixel data for the 0x20 char's 1st top column, bit 0 is the top pixel, bit 7 is the 8th pixel down from the top
|
|
||||||
// Byte2 = pixel data for the 0x20 char's 1st bottom column, bit 0 is the 9th pixel
|
|
||||||
// Byte5 = pixel data for the 0x20 char's 2nd top column
|
|
||||||
// Byte6 = pixel data for the 0x20 char's 2nd bottom column
|
|
||||||
// ... = remaining pairs of bytes of the columns in the 0x20 char
|
|
||||||
// ... = width of the 0x21 char in pixels
|
|
||||||
// ... = pixel data for the 0x21 char
|
|
||||||
// ...
|
|
||||||
//
|
|
||||||
const uint8_t font_MediumBold[] = {
|
|
||||||
0x0B, 0x01, 0x0D, 0x02, 0x00,
|
|
||||||
|
|
||||||
0xC5, 0x00, 0xCE, 0x00, 0xD3, 0x00, 0xDE, 0x00, 0xEF, 0x00, 0xFC, 0x00,
|
|
||||||
0x15, 0x01, 0x26, 0x01, 0x2B, 0x01, 0x34, 0x01, 0x3D, 0x01, 0x4A, 0x01,
|
|
||||||
0x5B, 0x01, 0x60, 0x01, 0x69, 0x01, 0x6E, 0x01, 0x79, 0x01, 0x86, 0x01,
|
|
||||||
0x93, 0x01, 0xA0, 0x01, 0xAD, 0x01, 0xBA, 0x01, 0xC7, 0x01, 0xD4, 0x01,
|
|
||||||
0xE1, 0x01, 0xEE, 0x01, 0xFB, 0x01, 0x00, 0x02, 0x05, 0x02, 0x16, 0x02,
|
|
||||||
0x27, 0x02, 0x38, 0x02, 0x43, 0x02, 0x56, 0x02, 0x65, 0x02, 0x72, 0x02,
|
|
||||||
0x7F, 0x02, 0x8E, 0x02, 0x99, 0x02, 0xA4, 0x02, 0xB3, 0x02, 0xC2, 0x02,
|
|
||||||
0xCB, 0x02, 0xD6, 0x02, 0xE3, 0x02, 0xEE, 0x02, 0x01, 0x03, 0x0E, 0x03,
|
|
||||||
0x1D, 0x03, 0x2A, 0x03, 0x39, 0x03, 0x48, 0x03, 0x55, 0x03, 0x62, 0x03,
|
|
||||||
0x71, 0x03, 0x7E, 0x03, 0x93, 0x03, 0xA0, 0x03, 0xAD, 0x03, 0xBA, 0x03,
|
|
||||||
0xC3, 0x03, 0xCE, 0x03, 0xD7, 0x03, 0xE6, 0x03, 0xF5, 0x03, 0xFE, 0x03,
|
|
||||||
0x0B, 0x04, 0x18, 0x04, 0x23, 0x04, 0x30, 0x04, 0x3D, 0x04, 0x46, 0x04,
|
|
||||||
0x53, 0x04, 0x60, 0x04, 0x65, 0x04, 0x6C, 0x04, 0x79, 0x04, 0x7E, 0x04,
|
|
||||||
0x93, 0x04, 0xA0, 0x04, 0xAD, 0x04, 0xBA, 0x04, 0xC7, 0x04, 0xD0, 0x04,
|
|
||||||
0xDB, 0x04, 0xE4, 0x04, 0xF1, 0x04, 0xFE, 0x04, 0x0F, 0x05, 0x1C, 0x05,
|
|
||||||
0x29, 0x05, 0x34, 0x05, 0x41, 0x05, 0x4A, 0x05, 0x57, 0x05, 0x68, 0x05,
|
|
||||||
|
|
||||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7E, 0x01,
|
|
||||||
0x7E, 0x01, 0x05, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07,
|
|
||||||
0x00, 0x08, 0xC0, 0x00, 0xD8, 0x03, 0xF8, 0x00, 0xDE, 0x00, 0xD8, 0x03,
|
|
||||||
0xF8, 0x00, 0xDE, 0x00, 0x18, 0x00, 0x06, 0x98, 0x00, 0x3C, 0x01, 0xE4,
|
|
||||||
0x07, 0x3F, 0x01, 0xE4, 0x01, 0xC8, 0x00, 0x0C, 0x1C, 0x00, 0x3E, 0x00,
|
|
||||||
0x22, 0x00, 0x3E, 0x00, 0x9C, 0x01, 0x60, 0x00, 0x18, 0x00, 0xE6, 0x00,
|
|
||||||
0xF0, 0x01, 0x10, 0x01, 0xF0, 0x01, 0xE0, 0x00, 0x08, 0xEC, 0x00, 0xFE,
|
|
||||||
0x01, 0x12, 0x01, 0x3E, 0x01, 0x6C, 0x01, 0xC0, 0x00, 0xB0, 0x01, 0x10,
|
|
||||||
0x01, 0x02, 0x07, 0x00, 0x07, 0x00, 0x04, 0xF8, 0x00, 0xFE, 0x03, 0x07,
|
|
||||||
0x07, 0x01, 0x04, 0x04, 0x01, 0x04, 0x07, 0x07, 0xFE, 0x03, 0xF8, 0x00,
|
|
||||||
0x06, 0x0A, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x1F, 0x00, 0x04, 0x00, 0x0A,
|
|
||||||
0x00, 0x08, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFC, 0x01,
|
|
||||||
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x02, 0x80, 0x07, 0x80, 0x03, 0x04,
|
|
||||||
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x02, 0x80, 0x01, 0x80,
|
|
||||||
0x01, 0x05, 0x00, 0x06, 0x80, 0x01, 0x70, 0x00, 0x0C, 0x00, 0x03, 0x00,
|
|
||||||
0x06, 0xFC, 0x00, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFE, 0x01, 0xFC,
|
|
||||||
0x00, 0x06, 0x00, 0x00, 0x04, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x01,
|
|
||||||
0x00, 0x00, 0x06, 0x84, 0x01, 0xC6, 0x01, 0x62, 0x01, 0x32, 0x01, 0x1E,
|
|
||||||
0x01, 0x0C, 0x01, 0x06, 0x84, 0x00, 0x86, 0x01, 0x12, 0x01, 0x12, 0x01,
|
|
||||||
0xFE, 0x01, 0xEC, 0x00, 0x06, 0x60, 0x00, 0x50, 0x00, 0x48, 0x00, 0xFC,
|
|
||||||
0x01, 0xFE, 0x01, 0x40, 0x00, 0x06, 0x80, 0x00, 0x9E, 0x01, 0x1E, 0x01,
|
|
||||||
0x12, 0x01, 0xF2, 0x01, 0xE2, 0x00, 0x06, 0xFC, 0x00, 0xFE, 0x01, 0x12,
|
|
||||||
0x01, 0x12, 0x01, 0xF2, 0x01, 0xE0, 0x00, 0x06, 0x02, 0x00, 0x02, 0x00,
|
|
||||||
0xC2, 0x01, 0xFA, 0x01, 0x3E, 0x00, 0x06, 0x00, 0x06, 0xEC, 0x00, 0xFE,
|
|
||||||
0x01, 0x12, 0x01, 0x12, 0x01, 0xFE, 0x01, 0xEC, 0x00, 0x06, 0x1C, 0x00,
|
|
||||||
0x3E, 0x01, 0x22, 0x01, 0x22, 0x01, 0xFE, 0x01, 0xFC, 0x00, 0x02, 0x98,
|
|
||||||
0x01, 0x98, 0x01, 0x02, 0x98, 0x07, 0x98, 0x03, 0x08, 0x00, 0x00, 0x20,
|
|
||||||
0x00, 0x50, 0x00, 0x50, 0x00, 0x88, 0x00, 0x88, 0x00, 0x04, 0x01, 0x04,
|
|
||||||
0x01, 0x08, 0x00, 0x00, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00,
|
|
||||||
0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x08, 0x00, 0x00, 0x04, 0x01, 0x04,
|
|
||||||
0x01, 0x88, 0x00, 0x88, 0x00, 0x50, 0x00, 0x50, 0x00, 0x20, 0x00, 0x05,
|
|
||||||
0x04, 0x00, 0x62, 0x01, 0x72, 0x01, 0x1E, 0x00, 0x0C, 0x00, 0x09, 0xF8,
|
|
||||||
0x00, 0x04, 0x01, 0x72, 0x02, 0xFA, 0x02, 0x8A, 0x02, 0x7A, 0x02, 0xFA,
|
|
||||||
0x02, 0x84, 0x00, 0x78, 0x00, 0x07, 0xC0, 0x01, 0xF8, 0x01, 0x7E, 0x00,
|
|
||||||
0x46, 0x00, 0x7E, 0x00, 0xF8, 0x01, 0xC0, 0x01, 0x06, 0xFE, 0x01, 0xFE,
|
|
||||||
0x01, 0x12, 0x01, 0x12, 0x01, 0xFE, 0x01, 0xEC, 0x00, 0x06, 0xFC, 0x00,
|
|
||||||
0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x07, 0xFE,
|
|
||||||
0x01, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x86, 0x01, 0xFC, 0x00, 0x78,
|
|
||||||
0x00, 0x05, 0xFE, 0x01, 0xFE, 0x01, 0x12, 0x01, 0x12, 0x01, 0x12, 0x01,
|
|
||||||
0x05, 0xFE, 0x01, 0xFE, 0x01, 0x12, 0x00, 0x12, 0x00, 0x12, 0x00, 0x07,
|
|
||||||
0xFC, 0x00, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x22, 0x01, 0xE2, 0x01,
|
|
||||||
0xE2, 0x01, 0x07, 0xFE, 0x01, 0xFE, 0x01, 0x10, 0x00, 0x10, 0x00, 0x10,
|
|
||||||
0x00, 0xFE, 0x01, 0xFE, 0x01, 0x04, 0x02, 0x01, 0xFE, 0x01, 0xFE, 0x01,
|
|
||||||
0x02, 0x01, 0x05, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFE, 0x01, 0xFE,
|
|
||||||
0x00, 0x06, 0xFE, 0x01, 0xFE, 0x01, 0x78, 0x00, 0xCC, 0x00, 0x86, 0x01,
|
|
||||||
0x02, 0x01, 0x05, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
|
|
||||||
0x01, 0x09, 0xFE, 0x01, 0x0E, 0x00, 0x1C, 0x00, 0x38, 0x00, 0x30, 0x00,
|
|
||||||
0x18, 0x00, 0x0C, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x06, 0xFE, 0x01, 0x0E,
|
|
||||||
0x00, 0x1C, 0x00, 0x38, 0x00, 0x70, 0x00, 0xFE, 0x01, 0x07, 0xFC, 0x00,
|
|
||||||
0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFE, 0x01, 0xFC, 0x00,
|
|
||||||
0x06, 0xFE, 0x01, 0xFE, 0x01, 0x22, 0x00, 0x22, 0x00, 0x3E, 0x00, 0x1C,
|
|
||||||
0x00, 0x07, 0xFC, 0x00, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x07,
|
|
||||||
0xFE, 0x05, 0xFC, 0x04, 0x07, 0xFE, 0x01, 0xFE, 0x01, 0x22, 0x00, 0x62,
|
|
||||||
0x00, 0xFE, 0x00, 0x9C, 0x01, 0x00, 0x01, 0x06, 0x1C, 0x01, 0x3E, 0x01,
|
|
||||||
0x32, 0x01, 0x32, 0x01, 0xF2, 0x01, 0xE2, 0x00, 0x06, 0x02, 0x00, 0x02,
|
|
||||||
0x00, 0xFE, 0x01, 0xFE, 0x01, 0x02, 0x00, 0x02, 0x00, 0x07, 0xFE, 0x00,
|
|
||||||
0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFE, 0x01, 0xFE, 0x00,
|
|
||||||
0x06, 0x0E, 0x00, 0x7E, 0x00, 0xF0, 0x01, 0xF0, 0x01, 0x7E, 0x00, 0x0E,
|
|
||||||
0x00, 0x0A, 0x0E, 0x00, 0x7E, 0x00, 0xF0, 0x01, 0xE0, 0x01, 0x3E, 0x00,
|
|
||||||
0x3E, 0x00, 0xE0, 0x01, 0xF0, 0x01, 0x7E, 0x00, 0x0E, 0x00, 0x06, 0x86,
|
|
||||||
0x01, 0xCE, 0x01, 0x78, 0x00, 0x78, 0x00, 0xCE, 0x01, 0x86, 0x01, 0x06,
|
|
||||||
0x06, 0x00, 0x1E, 0x00, 0xF8, 0x01, 0xF8, 0x01, 0x1E, 0x00, 0x06, 0x00,
|
|
||||||
0x06, 0xC2, 0x01, 0xE2, 0x01, 0x72, 0x01, 0x3A, 0x01, 0x1E, 0x01, 0x0E,
|
|
||||||
0x01, 0x04, 0xFF, 0x07, 0xFF, 0x07, 0x01, 0x04, 0x01, 0x04, 0x05, 0x03,
|
|
||||||
0x00, 0x0C, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x06, 0x04, 0x01, 0x04,
|
|
||||||
0x01, 0x04, 0xFF, 0x07, 0xFF, 0x07, 0x07, 0x10, 0x00, 0x08, 0x00, 0x04,
|
|
||||||
0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x07, 0x00, 0x04,
|
|
||||||
0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04,
|
|
||||||
0x04, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0x06, 0xC0, 0x00,
|
|
||||||
0xE8, 0x01, 0x28, 0x01, 0x28, 0x01, 0xF8, 0x01, 0xF0, 0x01, 0x06, 0xFF,
|
|
||||||
0x01, 0xFF, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF8, 0x01, 0xF0, 0x00, 0x05,
|
|
||||||
0xF0, 0x00, 0xF8, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x06, 0xF0,
|
|
||||||
0x00, 0xF8, 0x01, 0x08, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0x06,
|
|
||||||
0xF0, 0x00, 0xF8, 0x01, 0x28, 0x01, 0x28, 0x01, 0x38, 0x01, 0x30, 0x01,
|
|
||||||
0x04, 0xFE, 0x01, 0xFF, 0x01, 0x09, 0x00, 0x01, 0x00, 0x06, 0xF0, 0x00,
|
|
||||||
0xF8, 0x05, 0x08, 0x05, 0x08, 0x05, 0xF8, 0x07, 0xF8, 0x03, 0x06, 0xFF,
|
|
||||||
0x01, 0xFF, 0x01, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x01, 0xF0, 0x01, 0x02,
|
|
||||||
0xFA, 0x01, 0xFA, 0x01, 0x03, 0x08, 0x04, 0xFA, 0x07, 0xFA, 0x03, 0x06,
|
|
||||||
0xFF, 0x01, 0xFF, 0x01, 0x60, 0x00, 0xF0, 0x00, 0x98, 0x01, 0x08, 0x01,
|
|
||||||
0x02, 0xFF, 0x01, 0xFF, 0x01, 0x0A, 0xF8, 0x01, 0xF8, 0x01, 0x08, 0x00,
|
|
||||||
0x08, 0x00, 0xF8, 0x01, 0xF0, 0x01, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x01,
|
|
||||||
0xF0, 0x01, 0x06, 0xF8, 0x01, 0xF8, 0x01, 0x08, 0x00, 0x08, 0x00, 0xF8,
|
|
||||||
0x01, 0xF0, 0x01, 0x06, 0xF0, 0x00, 0xF8, 0x01, 0x08, 0x01, 0x08, 0x01,
|
|
||||||
0xF8, 0x01, 0xF0, 0x00, 0x06, 0xF8, 0x07, 0xF8, 0x07, 0x08, 0x01, 0x08,
|
|
||||||
0x01, 0xF8, 0x01, 0xF0, 0x00, 0x06, 0xF0, 0x00, 0xF8, 0x01, 0x08, 0x01,
|
|
||||||
0x08, 0x01, 0xF8, 0x07, 0xF8, 0x07, 0x04, 0xF8, 0x01, 0xF8, 0x01, 0x10,
|
|
||||||
0x00, 0x18, 0x00, 0x05, 0x30, 0x01, 0x78, 0x01, 0x68, 0x01, 0xE8, 0x01,
|
|
||||||
0xC8, 0x00, 0x04, 0xFE, 0x00, 0xFE, 0x01, 0x08, 0x01, 0x08, 0x01, 0x06,
|
|
||||||
0xF8, 0x00, 0xF8, 0x01, 0x00, 0x01, 0x00, 0x01, 0xF8, 0x01, 0xF8, 0x01,
|
|
||||||
0x06, 0x18, 0x00, 0x78, 0x00, 0xE0, 0x01, 0xE0, 0x01, 0x78, 0x00, 0x18,
|
|
||||||
0x00, 0x08, 0x78, 0x00, 0xF8, 0x01, 0xC0, 0x01, 0x78, 0x00, 0x78, 0x00,
|
|
||||||
0xC0, 0x01, 0xF8, 0x01, 0x78, 0x00, 0x06, 0x98, 0x01, 0xF8, 0x01, 0x60,
|
|
||||||
0x00, 0x60, 0x00, 0xF8, 0x01, 0x98, 0x01, 0x06, 0x18, 0x00, 0x78, 0x06,
|
|
||||||
0xE0, 0x07, 0xE0, 0x01, 0x78, 0x00, 0x18, 0x00, 0x05, 0x88, 0x01, 0xC8,
|
|
||||||
0x01, 0x68, 0x01, 0x38, 0x01, 0x18, 0x01, 0x06, 0x20, 0x00, 0x20, 0x00,
|
|
||||||
0xFE, 0x03, 0xDF, 0x07, 0x01, 0x04, 0x01, 0x04, 0x04, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0xFF, 0x07, 0xFF, 0x07, 0x06, 0x01, 0x04, 0x01, 0x04, 0xDF, 0x07,
|
|
||||||
0xFE, 0x03, 0x20, 0x00, 0x20, 0x00, 0x08, 0x60, 0x00, 0x10, 0x00, 0x10,
|
|
||||||
0x00, 0x30, 0x00, 0x60, 0x00, 0x40, 0x00, 0x40, 0x00, 0x30, 0x00, 0x04,
|
|
||||||
0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 1 // font_LargeNumbers
|
|
||||||
//
|
|
||||||
// Large numbers font, height = 16 (including the decenders)
|
|
||||||
// Characters include: 0 - 9, -, +, ., %, :, Space, Comma
|
|
||||||
// The font table contains 3 sections: Header, Table Of Character Indexes, Pixel data
|
|
||||||
//
|
|
||||||
// The Header contains two bytes:
|
|
||||||
// Byte0 = Font height (including decenders)
|
|
||||||
// Byte1 = Number of additional pixels that should be drawn right of char
|
|
||||||
// Byte2 = Recommended line spacing
|
|
||||||
// Byte3 = Height of decenders
|
|
||||||
// Byte4 = Unused byte
|
|
||||||
//
|
|
||||||
// The Table Of Character Indexes, is a table of 2 byte words that index to the pixel data within this table
|
|
||||||
// Word0 = Index into this table to the pixels for ASCII char 0x20
|
|
||||||
// Word1 = Index into this table to the pixels for ASCII char 0x21
|
|
||||||
// Word2 = Index into this table to the pixels for ASCII char 0x22
|
|
||||||
// ...
|
|
||||||
// Word95 = Index into this table to the pixels for ASCII char 0x7F
|
|
||||||
//
|
|
||||||
// The Pixel data table contains the bitmap for each character
|
|
||||||
// Data is written in columns of pixels, each column is 16 bits (2 bytes)
|
|
||||||
// Byte0 = width of the ASCII 0x20 character in pixels
|
|
||||||
// Byte1 = pixel data for the 0x20 char's 1st top column, bit 0 is the top pixel, bit 7 is the 8th pixel down from the top
|
|
||||||
// Byte2 = pixel data for the 0x20 char's 1st bottom column, bit 0 is the 9th pixel
|
|
||||||
// Byte5 = pixel data for the 0x20 char's 2nd top column
|
|
||||||
// Byte6 = pixel data for the 0x20 char's 2nd bottom column
|
|
||||||
// ... = remaining pairs of bytes of the columns in the 0x20 char
|
|
||||||
// ... = width of the 0x21 char in pixels
|
|
||||||
// ... = pixel data for the 0x21 char
|
|
||||||
// ...
|
|
||||||
//
|
|
||||||
const uint8_t font_LargeNumbers[] = {
|
|
||||||
0x10, 0x02, 0x15, 0x01, 0x00,
|
|
||||||
|
|
||||||
0xC5, 0x00, 0xC6, 0x00, 0xC7, 0x00, 0xC8, 0x00, 0xC9, 0x00, 0xCA, 0x00,
|
|
||||||
0xE9, 0x00, 0xEA, 0x00, 0xEB, 0x00, 0xEC, 0x00, 0xED, 0x00, 0xEE, 0x00,
|
|
||||||
0x05, 0x01, 0x0C, 0x01, 0x19, 0x01, 0x20, 0x01, 0x21, 0x01, 0x36, 0x01,
|
|
||||||
0x4B, 0x01, 0x60, 0x01, 0x75, 0x01, 0x8A, 0x01, 0x9F, 0x01, 0xB4, 0x01,
|
|
||||||
0xC9, 0x01, 0xDE, 0x01,
|
|
||||||
|
|
||||||
0xF3, 0x01, 0xFC, 0x01, 0xFD, 0x01, 0xFE, 0x01,
|
|
||||||
|
|
||||||
0xFF, 0x01, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x02, 0x04, 0x02,
|
|
||||||
0x05, 0x02, 0x06, 0x02, 0x07, 0x02, 0x08, 0x02, 0x09, 0x02, 0x0A, 0x02,
|
|
||||||
0x0B, 0x02, 0x0C, 0x02, 0x0D, 0x02, 0x0E, 0x02, 0x0F, 0x02, 0x10, 0x02,
|
|
||||||
0x11, 0x02, 0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, 0x16, 0x02,
|
|
||||||
0x17, 0x02, 0x18, 0x02, 0x19, 0x02, 0x1A, 0x02, 0x1B, 0x02, 0x1C, 0x02,
|
|
||||||
0x1D, 0x02, 0x1E, 0x02, 0x1F, 0x02, 0x20, 0x02, 0x21, 0x02, 0x22, 0x02,
|
|
||||||
0x23, 0x02, 0x24, 0x02, 0x25, 0x02, 0x26, 0x02, 0x27, 0x02, 0x28, 0x02,
|
|
||||||
0x29, 0x02, 0x2A, 0x02, 0x2B, 0x02, 0x2C, 0x02, 0x2D, 0x02, 0x2E, 0x02,
|
|
||||||
0x2F, 0x02, 0x30, 0x02, 0x31, 0x02, 0x32, 0x02, 0x33, 0x02, 0x34, 0x02,
|
|
||||||
0x35, 0x02, 0x36, 0x02, 0x37, 0x02, 0x38, 0x02, 0x39, 0x02, 0x3A, 0x02,
|
|
||||||
0x3B, 0x02, 0x3C, 0x02, 0x3D, 0x02, 0x3E, 0x02, 0x3F, 0x02, 0x40, 0x02,
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x7E, 0x00, 0xFF, 0x00, 0xC3, 0x00,
|
|
||||||
0xC3, 0x80, 0xFF, 0xE0, 0x7E, 0x7C, 0x00, 0x1F, 0xC0, 0x07, 0xF0, 0x00,
|
|
||||||
0x3E, 0x7E, 0x0F, 0xFF, 0x03, 0xC3, 0x00, 0xC3, 0x00, 0xFF, 0x00, 0x7E,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01,
|
|
||||||
0xC0, 0x01, 0xFC, 0x1F, 0xFC, 0x1F, 0xFC, 0x1F, 0xC0, 0x01, 0xC0, 0x01,
|
|
||||||
0xC0, 0x01, 0xC0, 0x01, 0x03, 0x00, 0x70, 0x00, 0x70, 0x00, 0xF0, 0x06,
|
|
||||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07,
|
|
||||||
0x03, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x0A, 0xF8, 0x0F, 0xFE,
|
|
||||||
0x3F, 0xFE, 0x3F, 0x07, 0x70, 0x03, 0x60, 0x03, 0x60, 0x07, 0x70, 0xFE,
|
|
||||||
0x3F, 0xFE, 0x3F, 0xF8, 0x0F, 0x0A, 0x00, 0x00, 0x70, 0x00, 0x38, 0x00,
|
|
||||||
0x38, 0x00, 0x1C, 0x00, 0xFF, 0x7F, 0xFF, 0x7F, 0xFF, 0x7F, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x0A, 0x0C, 0x60, 0x0E, 0x70, 0x0F, 0x7C, 0x07, 0x7E, 0x03,
|
|
||||||
0x6F, 0x83, 0x67, 0xC7, 0x63, 0xFF, 0x61, 0xFE, 0x60, 0x3C, 0x60, 0x0A,
|
|
||||||
0x0C, 0x18, 0x0E, 0x38, 0x0F, 0x78, 0xC3, 0x70, 0xC3, 0x60, 0xE3, 0x60,
|
|
||||||
0xFF, 0x71, 0xFE, 0x3F, 0x3C, 0x3F, 0x00, 0x0E, 0x0A, 0x00, 0x0F, 0xC0,
|
|
||||||
0x0D, 0xE0, 0x0C, 0x38, 0x0C, 0x1E, 0x0C, 0xFF, 0x7F, 0xFF, 0x7F, 0xFF,
|
|
||||||
0x7F, 0x00, 0x0C, 0x00, 0x0C, 0x0A, 0xC0, 0x18, 0xFC, 0x38, 0xFF, 0x78,
|
|
||||||
0x7F, 0x70, 0x63, 0x60, 0x63, 0x60, 0xE3, 0x70, 0xE3, 0x3F, 0xC3, 0x3F,
|
|
||||||
0x80, 0x0F, 0x0A, 0xF8, 0x0F, 0xFE, 0x3F, 0xFE, 0x3F, 0xC7, 0x70, 0x63,
|
|
||||||
0x60, 0x63, 0x60, 0xE7, 0x70, 0xEF, 0x3F, 0xC6, 0x3F, 0x04, 0x0F, 0x0A,
|
|
||||||
0x03, 0x00, 0x03, 0x00, 0x03, 0x78, 0x03, 0x7F, 0xC3, 0x7F, 0xF3, 0x07,
|
|
||||||
0xFB, 0x00, 0x3F, 0x00, 0x0F, 0x00, 0x07, 0x00, 0x0A, 0x1C, 0x1E, 0x3E,
|
|
||||||
0x3F, 0xFF, 0x7F, 0xE7, 0x71, 0xC3, 0x60, 0xC3, 0x60, 0xE7, 0x71, 0xFF,
|
|
||||||
0x7F, 0x3E, 0x3F, 0x1C, 0x1E, 0x0A, 0x78, 0x10, 0xFE, 0x39, 0xFE, 0x7B,
|
|
||||||
0x87, 0x73, 0x03, 0x63, 0x03, 0x63, 0x87, 0x71, 0xFE, 0x3F, 0xFE, 0x3F,
|
|
||||||
0xF8, 0x0F, 0x04, 0x00, 0x00, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
39
glcd/fonts.h
39
glcd/fonts.h
|
@ -1,39 +0,0 @@
|
||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2012
|
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
|
||||||
|
|
||||||
This file is part of ChibiOS-LCD-Driver.
|
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#ifndef _FONT_
|
|
||||||
#define _FONT_
|
|
||||||
|
|
||||||
#define FONT_TABLE_HEIGHT_IDX 0
|
|
||||||
#define FONT_TABLE_PAD_AFTER_CHAR_IDX 1
|
|
||||||
#define FONT_TABLE_LINE_SPACING_IDX 2
|
|
||||||
#define FONT_TABLE_DECENDERS_HEIGHT_IDX 3
|
|
||||||
#define FONT_TABLE_UNUSED_IDX 4
|
|
||||||
#define FONT_TABLE_CHAR_LOOKUP_IDX 5
|
|
||||||
|
|
||||||
extern const uint8_t font_Small[];
|
|
||||||
extern const uint8_t font_Larger[];
|
|
||||||
//extern const uint8_t font_Medium[];
|
|
||||||
extern const uint8_t font_MediumBold[];
|
|
||||||
extern const uint8_t font_LargeNumbers[];
|
|
||||||
|
|
||||||
#endif
|
|
1045
glcd/glcd.c
1045
glcd/glcd.c
File diff suppressed because it is too large
Load diff
271
glcd/glcd.h
271
glcd/glcd.h
|
@ -1,123 +1,148 @@
|
||||||
/*
|
/*
|
||||||
ChibiOS/RT - Copyright (C) 2012
|
ChibiOS/RT - Copyright (C) 2012
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
Joel Bodenmann aka Tectu <joel@unormal.org>
|
||||||
|
|
||||||
This file is part of ChibiOS-LCD-Driver.
|
This file is part of ChibiOS-LCD-Driver.
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GLCD_H
|
#ifndef GLCD_H
|
||||||
#define GLCD_H
|
#define GLCD_H
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "fonts.h"
|
|
||||||
|
#define PORTRAIT (lcdGetOrientation() == portrait || lcdGetOrientation() == portraitInv)
|
||||||
#if !defined(LCD_USE_FSMC) && !defined(LCD_USE_GPIO) && !defined(LCD_USE_SPI)
|
#define LANDSCAPE (lcdGetOrientation() == landscape || lcdGetOrientation() == landscapeInv)
|
||||||
#include "glcdconf.h"
|
|
||||||
#endif
|
/* New fonts */
|
||||||
|
extern const struct font fontSmall;
|
||||||
#include "ssd1289_lld.h"
|
extern const struct font fontSmallDouble;
|
||||||
#include "s6d1121_lld.h"
|
extern const struct font fontSmallNarrow;
|
||||||
|
extern const struct font fontLarger;
|
||||||
#define PORTRAIT (lcdGetOrientation() == portrait || lcdGetOrientation() == portraitInv)
|
extern const struct font fontLargerDouble;
|
||||||
#define LANDSCAPE (lcdGetOrientation() == landscape || lcdGetOrientation() == landscapeInv)
|
extern const struct font fontLargerNarrow;
|
||||||
|
extern const struct font fontUI1;
|
||||||
/* LCD color */
|
extern const struct font fontUI1Double;
|
||||||
#define White 0xFFFF
|
extern const struct font fontUI1Narrow;
|
||||||
#define Black 0x0000
|
extern const struct font fontUI2;
|
||||||
#define Grey 0xF7DE
|
extern const struct font fontUI2Double;
|
||||||
#define Blue 0x001F
|
extern const struct font fontUI2Narrow;
|
||||||
#define Blue2 0x051F
|
extern const struct font fontLargeNumbers;
|
||||||
#define Red 0xF800
|
extern const struct font fontLargeNumbersDouble;
|
||||||
#define Magenta 0xF81F
|
extern const struct font fontLargeNumbersNarrow;
|
||||||
#define Green 0x07E0
|
|
||||||
#define Cyan 0x7FFF
|
/* Old font names */
|
||||||
#define Yellow 0xFFE0
|
#define font_Small (&fontSmall)
|
||||||
|
#define font_SmallDouble (&fontSmallDouble)
|
||||||
#define RGB565CONVERT(red, green, blue) \
|
#define font_SmallNarrow (&fontSmall)
|
||||||
(uint16_t)( (( red >> 3 ) << 11 ) | (( green >> 2 ) << 5 ) | ( blue >> 3 ))
|
#define font_Larger (&fontLarger)
|
||||||
|
#define font_LargerDouble (&fontLargerDouble)
|
||||||
enum orientation {portrait, landscape, portraitInv, landscapeInv};
|
#define font_LargerNarrow (&fontLargerNarrow)
|
||||||
enum filled {frame, filled};
|
#define font_MediumBold (&fontUI1)
|
||||||
enum transparency {solid, transparent};
|
#define font_MediumBoldDouble (&fontUI1Double)
|
||||||
enum powermode {powerOff, powerOn, sleepOn, sleepOff};
|
#define font_MediumBoldNarrow (&fontUI1Narrow)
|
||||||
|
#define font_LargeNumbers (&fontLargeNumbers)
|
||||||
typedef const uint8_t* font_t;
|
#define font_LargeNumbersDouble (&fontLargeNumbersDouble)
|
||||||
|
#define font_LargeNumbersNarrow (&fontLargeNumbersNarrow)
|
||||||
// A few macros
|
|
||||||
#define lcdGetFontHeight(font) (font[FONT_TABLE_HEIGHT_IDX])
|
/* LCD color - Note that GLCD only supports 16 bit color in the API */
|
||||||
|
#define White 0xFFFF
|
||||||
/**
|
#define Black 0x0000
|
||||||
* @brief Structure representing a GLCD driver.
|
#define Grey 0xF7DE
|
||||||
*/
|
#define Blue 0x001F
|
||||||
typedef struct GLCDDriver GLCDDriver;
|
#define Blue2 0x051F
|
||||||
|
#define Red 0xF800
|
||||||
struct GLCDDriver {
|
#define Magenta 0xF81F
|
||||||
};
|
#define Green 0x07E0
|
||||||
|
#define Cyan 0x7FFF
|
||||||
enum glcd_result { GLCD_DONE,
|
#define Yellow 0xFFE0
|
||||||
GLCD_FAILED,
|
|
||||||
GLCD_PROGRESS,
|
#define RGB565CONVERT(red, green, blue) \
|
||||||
};
|
(uint16_t)( (( red >> 3 ) << 11 ) | (( green >> 2 ) << 5 ) | ( blue >> 3 ))
|
||||||
|
|
||||||
typedef enum glcd_result glcd_result_t;
|
#ifndef _GDISP_LLD_H
|
||||||
|
/* Don't double define these at the low level driver */
|
||||||
#ifdef __cplusplus
|
typedef const struct font *font_t;
|
||||||
extern "C" {
|
enum orientation {portrait, landscape, portraitInv, landscapeInv};
|
||||||
#endif
|
enum powermode {powerOff, powerSleep, powerOn};
|
||||||
|
#define sleepOn powerSleep
|
||||||
/* Core functions */
|
#define sleepOff powerOn
|
||||||
void lcdInit(GLCDDriver *GLCDD1);
|
#endif
|
||||||
glcd_result_t lcdClear(uint16_t color);
|
|
||||||
glcd_result_t lcdSetOrientation(uint8_t newOrientation);
|
enum filled {frame, filled};
|
||||||
glcd_result_t lcdSetWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
|
enum transparency {solid, transparent};
|
||||||
glcd_result_t lcdFillArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);
|
|
||||||
glcd_result_t lcdWriteArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t *buffer, size_t n);
|
/**
|
||||||
glcd_result_t lcdSetPowerMode(uint8_t powerMode);
|
* @brief Structure representing a GLCD driver.
|
||||||
|
*/
|
||||||
/* Drawing functions */
|
typedef struct GLCDDriver GLCDDriver;
|
||||||
glcd_result_t lcdDrawPixel(uint16_t x, uint16_t y, uint16_t point);
|
|
||||||
void lcdDrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);
|
struct GLCDDriver {
|
||||||
void lcdDrawRect(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t filled, uint16_t color);
|
};
|
||||||
void lcdDrawRectString(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, const char* str, font_t font, uint16_t fontColor, uint16_t bkColor);
|
|
||||||
void lcdDrawCircle(uint16_t x, uint16_t y, uint16_t radius, uint8_t filled, uint16_t color);
|
enum glcd_result { GLCD_DONE,
|
||||||
void lcdDrawEllipse(uint16_t x, uint16_t y, uint16_t a, uint16_t b, uint8_t filled, uint16_t color);
|
GLCD_FAILED,
|
||||||
|
GLCD_PROGRESS,
|
||||||
/* Text Rendering Functions */
|
};
|
||||||
uint16_t lcdDrawChar(uint16_t cx, uint16_t cy, char c, font_t font, uint16_t color, uint16_t bkcolor, bool_t tpText);
|
|
||||||
void lcdDrawString(uint16_t x, uint16_t y, const char *str, font_t font, uint16_t color, uint16_t bkcolor, bool_t tpText);
|
typedef enum glcd_result glcd_result_t;
|
||||||
|
|
||||||
/* Character measuring functions */
|
#ifdef __cplusplus
|
||||||
uint16_t lcdMeasureChar(char c, font_t font);
|
extern "C" {
|
||||||
uint16_t lcdMeasureString(const char* str, font_t font);
|
#endif
|
||||||
|
|
||||||
/* Size and orientation related */
|
/* Core functions */
|
||||||
uint16_t lcdGetHeight(void);
|
void lcdInit(GLCDDriver *GLCDD1);
|
||||||
uint16_t lcdGetWidth(void);
|
glcd_result_t lcdClear(uint16_t color);
|
||||||
uint16_t lcdGetOrientation(void);
|
glcd_result_t lcdSetOrientation(uint8_t newOrientation);
|
||||||
|
glcd_result_t lcdFillArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);
|
||||||
/* BGR->RGB and pixel readback */
|
glcd_result_t lcdWriteArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t *buffer, size_t n);
|
||||||
uint16_t lcdBGR2RGB(uint16_t color);
|
glcd_result_t lcdSetPowerMode(uint8_t powerMode);
|
||||||
uint16_t lcdGetPixelColor(uint16_t x, uint16_t y);
|
|
||||||
|
/* Drawing functions */
|
||||||
/* Scrolling function */
|
glcd_result_t lcdDrawPixel(uint16_t x, uint16_t y, uint16_t point);
|
||||||
glcd_result_t lcdVerticalScroll(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, int16_t lines);
|
void lcdDrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);
|
||||||
|
void lcdDrawRect(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t filled, uint16_t color);
|
||||||
#ifdef __cplusplus
|
void lcdDrawRectString(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, const char* str, font_t font, uint16_t fontColor, uint16_t bkColor);
|
||||||
}
|
void lcdDrawCircle(uint16_t x, uint16_t y, uint16_t radius, uint8_t filled, uint16_t color);
|
||||||
#endif
|
void lcdDrawEllipse(uint16_t x, uint16_t y, uint16_t a, uint16_t b, uint8_t filled, uint16_t color);
|
||||||
|
|
||||||
#endif
|
/* Text Rendering Functions */
|
||||||
|
uint16_t lcdDrawChar(uint16_t cx, uint16_t cy, char c, font_t font, uint16_t color, uint16_t bkcolor, bool_t tpText);
|
||||||
|
void lcdDrawString(uint16_t x, uint16_t y, const char *str, font_t font, uint16_t color, uint16_t bkcolor, bool_t tpText);
|
||||||
|
|
||||||
|
/* Character measuring functions */
|
||||||
|
uint16_t lcdMeasureChar(char c, font_t font);
|
||||||
|
uint16_t lcdMeasureString(const char* str, font_t font);
|
||||||
|
uint16_t lcdGetFontHeight(font_t font);
|
||||||
|
|
||||||
|
/* Size and orientation related */
|
||||||
|
uint16_t lcdGetHeight(void);
|
||||||
|
uint16_t lcdGetWidth(void);
|
||||||
|
uint16_t lcdGetOrientation(void);
|
||||||
|
|
||||||
|
/* BGR->RGB and pixel readback */
|
||||||
|
uint16_t lcdBGR2RGB(uint16_t color);
|
||||||
|
uint16_t lcdGetPixelColor(uint16_t x, uint16_t y);
|
||||||
|
|
||||||
|
/* Scrolling function */
|
||||||
|
glcd_result_t lcdVerticalScroll(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, int16_t lines);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
10
glcd/glcd.mk
10
glcd/glcd.mk
|
@ -1,5 +1,5 @@
|
||||||
LCD_GLCD_SRC = $(LCDLIB)/glcd/glcd.c \
|
LCD_GLCD_SRC = $(LCDLIB)/glcd/glcd.c \
|
||||||
$(LCDLIB)/glcd/fonts.c \
|
$(LCDLIB)/glcd/console.c
|
||||||
$(LCDLIB)/glcd/console.c
|
|
||||||
|
LCD_GLCD_INC = $(LCDLIB)/glcd \
|
||||||
LCD_GLCD_INC = $(LCDLIB)/glcd
|
${CHIBIOS}/os/halext/include ${CHIBIOS}/os/halext/src
|
||||||
|
|
|
@ -1,153 +1,170 @@
|
||||||
/*
|
/*
|
||||||
ChibiOS/RT - Copyright (C) 2012
|
ChibiOS/RT - Copyright (C) 2012
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
Joel Bodenmann aka Tectu <joel@unormal.org>
|
||||||
|
|
||||||
This file is part of ChibiOS-LCD-Driver.
|
This file is part of ChibiOS-LCD-Driver.
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GLCD_WORKER_H
|
#ifndef GLCD_WORKER_H
|
||||||
#define GLCD_WORKER_H
|
#define GLCD_WORKER_H
|
||||||
|
|
||||||
#include "glcd.h"
|
#include "glcd.h"
|
||||||
|
|
||||||
#define GLCD_WORKER_SIZE 512
|
#define GLCD_WORKER_SIZE 512
|
||||||
|
|
||||||
enum glcd_action { GLCD_SET_POWERMODE,
|
enum glcd_action { GLCD_SET_POWERMODE,
|
||||||
GLCD_SET_ORIENTATION,
|
GLCD_SET_ORIENTATION,
|
||||||
GLCD_SET_WINDOW,
|
GLCD_FILL_AREA,
|
||||||
GLCD_FILL_AREA,
|
GLCD_WRITE_AREA,
|
||||||
GLCD_WRITE_AREA,
|
GLCD_CLEAR,
|
||||||
GLCD_CLEAR,
|
GLCD_GET_PIXEL_COLOR,
|
||||||
GLCD_GET_PIXEL_COLOR,
|
GLCD_DRAW_PIXEL,
|
||||||
GLCD_DRAW_PIXEL,
|
GLCD_VERTICAL_SCROLL,
|
||||||
GLCD_WRITE_STREAM_START,
|
GLCD_DRAW_CHAR,
|
||||||
GLCD_WRITE_STREAM_STOP,
|
GLCD_DRAW_LINE,
|
||||||
GLCD_WRITE_STREAM,
|
GLCD_DRAW_CIRCLE,
|
||||||
GLCD_VERTICAL_SCROLL,
|
GLCD_DRAW_ELLIPSE,
|
||||||
GLCD_DRAW_CHAR,
|
};
|
||||||
};
|
|
||||||
|
#define _glcd_msg_base \
|
||||||
#define _glcd_msg_base \
|
enum glcd_action action;
|
||||||
enum glcd_action action;
|
|
||||||
|
struct glcd_msg_base {
|
||||||
struct glcd_msg_base {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_powermode {
|
||||||
struct glcd_msg_powermode {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
|
uint8_t powermode;
|
||||||
uint8_t powermode;
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_orientation {
|
||||||
struct glcd_msg_orientation {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
|
uint8_t newOrientation;
|
||||||
uint8_t newOrientation;
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_set_window {
|
||||||
struct glcd_msg_set_window {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
|
uint16_t x0;
|
||||||
uint16_t x0;
|
uint16_t y0;
|
||||||
uint16_t y0;
|
uint16_t x1;
|
||||||
uint16_t x1;
|
uint16_t y1;
|
||||||
uint16_t y1;
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_fill_area {
|
||||||
struct glcd_msg_fill_area {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
|
uint16_t x0;
|
||||||
uint16_t x0;
|
uint16_t y0;
|
||||||
uint16_t y0;
|
uint16_t x1;
|
||||||
uint16_t x1;
|
uint16_t y1;
|
||||||
uint16_t y1;
|
uint16_t color;
|
||||||
uint16_t color;
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_write_area {
|
||||||
struct glcd_msg_write_area {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
|
uint16_t x0;
|
||||||
uint16_t x0;
|
uint16_t y0;
|
||||||
uint16_t y0;
|
uint16_t x1;
|
||||||
uint16_t x1;
|
uint16_t y1;
|
||||||
uint16_t y1;
|
uint16_t *buffer;
|
||||||
uint16_t *buffer;
|
size_t size;
|
||||||
size_t size;
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_clear {
|
||||||
struct glcd_msg_clear {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
|
uint16_t color;
|
||||||
uint16_t color;
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_get_pixel_color {
|
||||||
struct glcd_msg_get_pixel_color {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
|
uint16_t x;
|
||||||
uint16_t x;
|
uint16_t y;
|
||||||
uint16_t y;
|
uint16_t color;
|
||||||
uint16_t color;
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_draw_pixel {
|
||||||
struct glcd_msg_draw_pixel {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
|
uint16_t x;
|
||||||
uint16_t x;
|
uint16_t y;
|
||||||
uint16_t y;
|
uint16_t color;
|
||||||
uint16_t color;
|
};
|
||||||
};
|
|
||||||
|
struct glcd_msg_vertical_scroll {
|
||||||
struct glcd_msg_write_stream_start {
|
_glcd_msg_base
|
||||||
_glcd_msg_base
|
|
||||||
};
|
uint16_t x0;
|
||||||
|
uint16_t y0;
|
||||||
struct glcd_msg_write_stream_stop {
|
uint16_t x1;
|
||||||
_glcd_msg_base
|
uint16_t y1;
|
||||||
};
|
int16_t lines;
|
||||||
|
};
|
||||||
struct glcd_msg_write_stream {
|
|
||||||
_glcd_msg_base
|
struct glcd_msg_draw_line {
|
||||||
|
_glcd_msg_base
|
||||||
uint16_t *buffer;
|
|
||||||
uint16_t size;
|
uint16_t x0;
|
||||||
};
|
uint16_t y0;
|
||||||
|
uint16_t x1;
|
||||||
struct glcd_msg_vertical_scroll {
|
uint16_t y1;
|
||||||
_glcd_msg_base
|
int16_t color;
|
||||||
|
};
|
||||||
uint16_t x0;
|
|
||||||
uint16_t y0;
|
struct glcd_msg_draw_circle {
|
||||||
uint16_t x1;
|
_glcd_msg_base
|
||||||
uint16_t y1;
|
|
||||||
int16_t lines;
|
uint16_t x;
|
||||||
};
|
uint16_t y;
|
||||||
|
uint16_t radius;
|
||||||
struct glcd_msg_draw_char {
|
uint16_t y1;
|
||||||
_glcd_msg_base;
|
uint8_t filled;
|
||||||
|
int16_t color;
|
||||||
uint16_t cx;
|
};
|
||||||
uint16_t cy;
|
|
||||||
uint16_t color;
|
struct glcd_msg_draw_ellipse {
|
||||||
uint16_t bkcolor;
|
_glcd_msg_base
|
||||||
uint16_t ret_width;
|
|
||||||
char c;
|
uint16_t x;
|
||||||
font_t font;
|
uint16_t y;
|
||||||
bool_t tpText;
|
uint16_t a;
|
||||||
};
|
uint16_t b;
|
||||||
|
uint16_t y1;
|
||||||
#endif
|
uint8_t filled;
|
||||||
|
int16_t color;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct glcd_msg_draw_char {
|
||||||
|
_glcd_msg_base;
|
||||||
|
|
||||||
|
uint16_t cx;
|
||||||
|
uint16_t cy;
|
||||||
|
uint16_t color;
|
||||||
|
uint16_t bkcolor;
|
||||||
|
uint16_t ret_width;
|
||||||
|
char c;
|
||||||
|
font_t font;
|
||||||
|
bool_t tpText;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
25
glcd/readme.txt
Normal file
25
glcd/readme.txt
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
GLCD now uses the GDISP low level drivers and fonts.
|
||||||
|
|
||||||
|
To update your make to use this new version:
|
||||||
|
Add the low level driver yo want to use to your make file. eg.
|
||||||
|
include $(CHIBIOS)/os/halext/drivers/gdispTestStub/gdisp_lld.mk
|
||||||
|
|
||||||
|
There some restrictions that GLCD places on your use of new features and on the capabilities
|
||||||
|
of the low level driver.
|
||||||
|
|
||||||
|
They are:
|
||||||
|
1/ GLCD requires a driver that supports RGB565 pixel format. This is a
|
||||||
|
limitation of the GLCD API. To update the API would create compatability
|
||||||
|
issues with existing applications.
|
||||||
|
2/ If you want to use the GLCD scroll or the GLCD read-pixel calls then your
|
||||||
|
low level driver must support them. If it doesn't these calls will
|
||||||
|
fail.
|
||||||
|
3/ You cannot reduce the code size like in GDISP by defining macros to
|
||||||
|
compile out code that you are not using.
|
||||||
|
4/ Some of the new features of GDISP like right or center justified text are not
|
||||||
|
supported as there is no equivelant API in GDISP.
|
||||||
|
5/ There is no mechanism to send hardware specific commands to the low level driver
|
||||||
|
such as commands to control the back-light.
|
||||||
|
|
||||||
|
What it does do that GDISP currently doesn't:
|
||||||
|
1/ Asynchronous multi-thread support.
|
|
@ -1,491 +1,244 @@
|
||||||
<<<<<<< HEAD
|
/*
|
||||||
/*
|
ChibiOS/RT - Copyright (C) 2012
|
||||||
ChibiOS/RT - Copyright (C) 2012
|
Joel Bodenmann aka Tectu <joel@unormal.org>
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
|
||||||
|
This file is part of ChibiOS-LCD-Driver.
|
||||||
This file is part of ChibiOS-LCD-Driver.
|
|
||||||
|
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
||||||
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License as published by
|
||||||
it under the terms of the GNU General Public License as published by
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
(at your option) any later version.
|
||||||
(at your option) any later version.
|
|
||||||
|
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
||||||
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
You should have received a copy of the GNU General Public License
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
*/
|
||||||
*/
|
|
||||||
|
#ifndef S6D1121_H
|
||||||
#ifndef S6D1121_H
|
#define S6D1121_H
|
||||||
#define S6D1121_H
|
|
||||||
|
// I/O assignments
|
||||||
// I/O assignments
|
#define LCD_BL_GPIO GPIOB
|
||||||
#define LCD_BL_GPIO GPIOB
|
#define LCD_BL_PIN 8
|
||||||
#define LCD_BL_PIN 8
|
|
||||||
|
#define LCD_CS_GPIO GPIOD
|
||||||
#define LCD_CS_GPIO GPIOD
|
#define LCD_CS_PIN 7
|
||||||
#define LCD_CS_PIN 7
|
|
||||||
|
#define LCD_RS_GPIO GPIOD
|
||||||
#define LCD_RS_GPIO GPIOD
|
#define LCD_RS_PIN 11
|
||||||
#define LCD_RS_PIN 11
|
|
||||||
|
#define LCD_RST_GPIO GPIOD
|
||||||
#define LCD_RST_GPIO GPIOD
|
#define LCD_RST_PIN 10
|
||||||
#define LCD_RST_PIN 10
|
|
||||||
|
#define LCD_RD_GPIO GPIOD
|
||||||
#define LCD_RD_GPIO GPIOD
|
#define LCD_RD_PIN 9
|
||||||
#define LCD_RD_PIN 9
|
|
||||||
|
#define LCD_WR_GPIO GPIOD
|
||||||
#define LCD_WR_GPIO GPIOD
|
#define LCD_WR_PIN 8
|
||||||
#define LCD_WR_PIN 8
|
|
||||||
|
#define LCD_D0_GPIO GPIOD
|
||||||
#define LCD_D0_GPIO GPIOD
|
#define LCD_D4_GPIO GPIOE
|
||||||
#define LCD_D4_GPIO GPIOE
|
|
||||||
|
/* all interfaces use RST via GPIO */
|
||||||
/* all interfaces use RST via GPIO */
|
/* TODO: option to disable RST; assumes RST is tied high */
|
||||||
/* TODO: option to disable RST; assumes RST is tied high */
|
#define LCD_RST_LOW palClearPad(LCD_RST_GPIO, LCD_RST_PIN)
|
||||||
#define LCD_RST_LOW palClearPad(LCD_RST_GPIO, LCD_RST_PIN)
|
#define LCD_RST_HIGH palSetPad(LCD_RST_GPIO, LCD_RST_PIN)
|
||||||
#define LCD_RST_HIGH palSetPad(LCD_RST_GPIO, LCD_RST_PIN)
|
|
||||||
|
#define s6d1121_delay(n) halPolledDelay(MS2RTT(n));
|
||||||
#define s6d1121_delay(n) halPolledDelay(MS2RTT(n));
|
|
||||||
|
#if defined(LCD_USE_GPIO)
|
||||||
#if defined(LCD_USE_GPIO)
|
|
||||||
|
#define LCD_CS_LOW palClearPad(LCD_CS_GPIO, LCD_CS_PIN)
|
||||||
#define LCD_CS_LOW palClearPad(LCD_CS_GPIO, LCD_CS_PIN)
|
#define LCD_CS_HIGH palSetPad(LCD_CS_GPIO, LCD_CS_PIN)
|
||||||
#define LCD_CS_HIGH palSetPad(LCD_CS_GPIO, LCD_CS_PIN)
|
|
||||||
|
#define LCD_RS_LOW palClearPad(LCD_RS_GPIO, LCD_RS_PIN)
|
||||||
#define LCD_RS_LOW palClearPad(LCD_RS_GPIO, LCD_RS_PIN)
|
#define LCD_RS_HIGH palSetPad(LCD_RS_GPIO, LCD_RS_PIN)
|
||||||
#define LCD_RS_HIGH palSetPad(LCD_RS_GPIO, LCD_RS_PIN)
|
|
||||||
|
#define LCD_RD_LOW palClearPad(LCD_RD_GPIO, LCD_RD_PIN)
|
||||||
#define LCD_RD_LOW palClearPad(LCD_RD_GPIO, LCD_RD_PIN)
|
#define LCD_RD_HIGH palSetPad(LCD_RD_GPIO, LCD_RD_PIN)
|
||||||
#define LCD_RD_HIGH palSetPad(LCD_RD_GPIO, LCD_RD_PIN)
|
|
||||||
|
#define LCD_WR_LOW palClearPad(LCD_WR_GPIO, LCD_WR_PIN)
|
||||||
#define LCD_WR_LOW palClearPad(LCD_WR_GPIO, LCD_WR_PIN)
|
#define LCD_WR_HIGH palSetPad(LCD_WR_GPIO, LCD_WR_PIN)
|
||||||
#define LCD_WR_HIGH palSetPad(LCD_WR_GPIO, LCD_WR_PIN)
|
|
||||||
|
#define LCD_BL_LOW palClearPad(LCD_BL_GPIO, LCD_BL_PIN)
|
||||||
#define LCD_BL_LOW palClearPad(LCD_BL_GPIO, LCD_BL_PIN)
|
#define LCD_BL_HIGH palSetPad(LCD_BL_GPIO, LCD_BL_PIN)
|
||||||
#define LCD_BL_HIGH palSetPad(LCD_BL_GPIO, LCD_BL_PIN)
|
|
||||||
|
|
||||||
|
static inline void lld_lcddelay(void) { asm volatile ("nop"); asm volatile ("nop"); }
|
||||||
static inline void lld_lcddelay(void) { asm volatile ("nop"); asm volatile ("nop"); }
|
static inline void lld_lcdwrite(uint16_t db) {
|
||||||
static inline void lld_lcdwrite(uint16_t db) {
|
LCD_D4_GPIO->BSRR.W=((~db&0xFFF0)<<16)|(db&0xFFF0);
|
||||||
LCD_D4_GPIO->BSRR.W=((~db&0xFFF0)<<16)|(db&0xFFF0);
|
LCD_D0_GPIO->BSRR.W=((~db&0x000F)<<16)|(db&0x000F);
|
||||||
LCD_D0_GPIO->BSRR.W=((~db&0x000F)<<16)|(db&0x000F);
|
LCD_WR_LOW;
|
||||||
LCD_WR_LOW;
|
lld_lcddelay();
|
||||||
lld_lcddelay();
|
LCD_WR_HIGH;
|
||||||
LCD_WR_HIGH;
|
}
|
||||||
}
|
static __inline uint16_t lld_lcdReadData(void) {
|
||||||
static __inline uint16_t lld_lcdReadData(void) {
|
uint16_t value=0;
|
||||||
uint16_t value=0;
|
|
||||||
|
LCD_RS_HIGH; LCD_WR_HIGH; LCD_RD_LOW;
|
||||||
LCD_RS_HIGH; LCD_WR_HIGH; LCD_RD_LOW;
|
#ifndef STM32F4XX
|
||||||
#ifndef STM32F4XX
|
// change pin mode to digital input
|
||||||
// change pin mode to digital input
|
LCD_DATA_PORT->CRH = 0x47444444;
|
||||||
LCD_DATA_PORT->CRH = 0x47444444;
|
LCD_DATA_PORT->CRL = 0x47444444;
|
||||||
LCD_DATA_PORT->CRL = 0x47444444;
|
#endif
|
||||||
#endif
|
#ifndef STM32F4XX
|
||||||
#ifndef STM32F4XX
|
// change pin mode back to digital output
|
||||||
// change pin mode back to digital output
|
LCD_DATA_PORT->CRH = 0x33333333;
|
||||||
LCD_DATA_PORT->CRH = 0x33333333;
|
LCD_DATA_PORT->CRL = 0x33333333;
|
||||||
LCD_DATA_PORT->CRL = 0x33333333;
|
#endif
|
||||||
#endif
|
LCD_RD_HIGH;
|
||||||
LCD_RD_HIGH;
|
return value;
|
||||||
return value;
|
}
|
||||||
}
|
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
|
||||||
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
|
uint16_t lcdRAM;
|
||||||
uint16_t lcdRAM;
|
|
||||||
|
LCD_CS_LOW; LCD_RS_LOW;
|
||||||
LCD_CS_LOW; LCD_RS_LOW;
|
lld_lcdwrite(lcdReg);
|
||||||
lld_lcdwrite(lcdReg);
|
LCD_RS_HIGH;
|
||||||
LCD_RS_HIGH;
|
lcdRAM = lld_lcdReadData();
|
||||||
lcdRAM = lld_lcdReadData();
|
LCD_CS_HIGH;
|
||||||
LCD_CS_HIGH;
|
return lcdRAM;
|
||||||
return lcdRAM;
|
}
|
||||||
}
|
static void lld_lcdWriteIndex(uint16_t lcdReg) {
|
||||||
static void lld_lcdWriteIndex(uint16_t lcdReg) {
|
LCD_RS_LOW;
|
||||||
LCD_RS_LOW;
|
lld_lcdwrite(lcdReg);
|
||||||
lld_lcdwrite(lcdReg);
|
LCD_RS_HIGH;
|
||||||
LCD_RS_HIGH;
|
}
|
||||||
}
|
static void lld_lcdWriteData(uint16_t lcdData) {
|
||||||
static void lld_lcdWriteData(uint16_t lcdData) {
|
lld_lcdwrite(lcdData);
|
||||||
lld_lcdwrite(lcdData);
|
}
|
||||||
}
|
static void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
|
||||||
static void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
|
LCD_CS_LOW;
|
||||||
LCD_CS_LOW;
|
lld_lcdWriteIndex(lcdReg);
|
||||||
lld_lcdWriteIndex(lcdReg);
|
lld_lcdWriteData(lcdRegValue);
|
||||||
lld_lcdWriteData(lcdRegValue);
|
LCD_CS_HIGH;
|
||||||
LCD_CS_HIGH;
|
}
|
||||||
}
|
static __inline void lld_lcdWriteStreamStart(void) {
|
||||||
static __inline void lld_lcdWriteStreamStart(void) {
|
LCD_CS_LOW;
|
||||||
LCD_CS_LOW;
|
lld_lcdWriteIndex(0x0022);
|
||||||
lld_lcdWriteIndex(0x0022);
|
}
|
||||||
}
|
static __inline void lld_lcdWriteStreamStop(void) {
|
||||||
static __inline void lld_lcdWriteStreamStop(void) {
|
LCD_CS_HIGH;
|
||||||
LCD_CS_HIGH;
|
}
|
||||||
}
|
static __inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
|
||||||
static __inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
|
uint16_t i;
|
||||||
uint16_t i;
|
|
||||||
|
for(i = 0; i < size; i++) { lld_lcdwrite(buffer[i]); }
|
||||||
for(i = 0; i < size; i++) { lld_lcdwrite(buffer[i]); }
|
}
|
||||||
}
|
static __inline void lld_lcdReadStreamStart(void) { /* TODO */ }
|
||||||
static __inline void lld_lcdReadStreamStart(void) { /* TODO */ }
|
static __inline void lld_lcdReadStreamStop(void) { /* TODO */ }
|
||||||
static __inline void lld_lcdReadStreamStop(void) { /* TODO */ }
|
static __inline void lld_lcdReadStream(uint16_t *UNUSED(buffer), size_t UNUSED(size)) { /* TODO */ }
|
||||||
static __inline void lld_lcdReadStream(uint16_t *UNUSED(buffer), size_t UNUSED(size)) { /* TODO */ }
|
|
||||||
|
#elif defined(LCD_USE_FSMC)
|
||||||
#elif defined(LCD_USE_FSMC)
|
#define LCD_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
|
||||||
#define LCD_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
|
#define LCD_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
|
||||||
#define LCD_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
|
|
||||||
|
static __inline void lld_lcdWriteIndex(uint16_t index) { LCD_REG = index; }
|
||||||
static __inline void lld_lcdWriteIndex(uint16_t index) { LCD_REG = index; }
|
static __inline void lld_lcdWriteData(uint16_t data) { LCD_RAM = data; }
|
||||||
static __inline void lld_lcdWriteData(uint16_t data) { LCD_RAM = data; }
|
static __inline void lld_lcdWriteReg(uint16_t lcdReg,uint16_t lcdRegValue) {
|
||||||
static __inline void lld_lcdWriteReg(uint16_t lcdReg,uint16_t lcdRegValue) {
|
LCD_REG = lcdReg;
|
||||||
LCD_REG = lcdReg;
|
LCD_RAM = lcdRegValue;
|
||||||
LCD_RAM = lcdRegValue;
|
}
|
||||||
}
|
static __inline uint16_t lld_lcdReadData(void) { return (LCD_RAM); }
|
||||||
static __inline uint16_t lld_lcdReadData(void) { return (LCD_RAM); }
|
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
|
||||||
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
|
LCD_REG = lcdReg;
|
||||||
LCD_REG = lcdReg;
|
return LCD_RAM;
|
||||||
return LCD_RAM;
|
}
|
||||||
}
|
static __inline void lld_lcdWriteStreamStart(void) { LCD_REG = 0x0022; }
|
||||||
static __inline void lld_lcdWriteStreamStart(void) { LCD_REG = 0x0022; }
|
static __inline void lld_lcdWriteStreamStop(void) {}
|
||||||
static __inline void lld_lcdWriteStreamStop(void) {}
|
static __inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
|
||||||
static __inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
|
uint16_t i;
|
||||||
uint16_t i;
|
for(i = 0; i < size; i++) LCD_RAM = buffer[i];
|
||||||
for(i = 0; i < size; i++) LCD_RAM = buffer[i];
|
}
|
||||||
}
|
static __inline void lld_lcdReadStreamStart(void) { LCD_REG = 0x0022; }
|
||||||
static __inline void lld_lcdReadStreamStart(void) { LCD_REG = 0x0022; }
|
static __inline void lld_lcdReadStreamStop(void) {}
|
||||||
static __inline void lld_lcdReadStreamStop(void) {}
|
static __inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
|
||||||
static __inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
|
uint16_t i;
|
||||||
uint16_t i;
|
volatile uint16_t dummy;
|
||||||
volatile uint16_t dummy;
|
|
||||||
|
/* throw away first value read */
|
||||||
/* throw away first value read */
|
dummy = LCD_RAM;
|
||||||
dummy = LCD_RAM;
|
for(i = 0; i < size; i++) buffer[i] = LCD_RAM;
|
||||||
for(i = 0; i < size; i++) buffer[i] = LCD_RAM;
|
}
|
||||||
}
|
|
||||||
|
#elif defined(LCD_USE_SPI)
|
||||||
#elif defined(LCD_USE_SPI)
|
#error "gdispS6d1121: LCD_USE_SPI not implemented yet"
|
||||||
#error "gdispS6d1121: LCD_USE_SPI not implemented yet"
|
|
||||||
|
#else
|
||||||
#else
|
#error "gdispS6d1121: No known LCD_USE_XXX has been defined"
|
||||||
#error "gdispS6d1121: No known LCD_USE_XXX has been defined"
|
#endif
|
||||||
#endif
|
|
||||||
|
static void lld_lcdSetCursor(coord_t x, coord_t y) {
|
||||||
static void lld_lcdSetCursor(coord_t x, coord_t y) {
|
/* R20h - 8 bit
|
||||||
/* R20h - 8 bit
|
* R21h - 9 bit
|
||||||
* R21h - 9 bit
|
*/
|
||||||
*/
|
switch(GDISP.Orientation) {
|
||||||
switch(GDISP.Orientation) {
|
case portraitInv:
|
||||||
case portraitInv:
|
lld_lcdWriteReg(0x0020, (SCREEN_WIDTH-1-x) & 0x00FF);
|
||||||
lld_lcdWriteReg(0x0020, (SCREEN_WIDTH-1-x) & 0x00FF);
|
lld_lcdWriteReg(0x0021, (SCREEN_HEIGHT-1-y) & 0x01FF);
|
||||||
lld_lcdWriteReg(0x0021, (SCREEN_HEIGHT-1-y) & 0x01FF);
|
break;
|
||||||
break;
|
case portrait:
|
||||||
case portrait:
|
lld_lcdWriteReg(0x0020, x & 0x00FF);
|
||||||
lld_lcdWriteReg(0x0020, x & 0x00FF);
|
lld_lcdWriteReg(0x0021, y & 0x01FF);
|
||||||
lld_lcdWriteReg(0x0021, y & 0x01FF);
|
break;
|
||||||
break;
|
case landscape:
|
||||||
case landscape:
|
lld_lcdWriteReg(0x0020, y & 0x00FF);
|
||||||
lld_lcdWriteReg(0x0020, y & 0x00FF);
|
lld_lcdWriteReg(0x0021, x & 0x01FF);
|
||||||
lld_lcdWriteReg(0x0021, x & 0x01FF);
|
break;
|
||||||
break;
|
case landscapeInv:
|
||||||
case landscapeInv:
|
lld_lcdWriteReg(0x0020, (SCREEN_WIDTH - y - 1) & 0x00FF);
|
||||||
lld_lcdWriteReg(0x0020, (SCREEN_WIDTH - y - 1) & 0x00FF);
|
lld_lcdWriteReg(0x0021, (SCREEN_HEIGHT - x - 1) & 0x01FF);
|
||||||
lld_lcdWriteReg(0x0021, (SCREEN_HEIGHT - x - 1) & 0x01FF);
|
break;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy) {
|
||||||
static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy) {
|
/* HSA / HEA are 8 bit
|
||||||
/* HSA / HEA are 8 bit
|
* VSA / VEA are 9 bit
|
||||||
* VSA / VEA are 9 bit
|
* use masks 0x00FF and 0x01FF to enforce this
|
||||||
* use masks 0x00FF and 0x01FF to enforce this
|
*/
|
||||||
*/
|
|
||||||
|
switch(GDISP.Orientation) {
|
||||||
switch(GDISP.Orientation) {
|
case portrait:
|
||||||
case portrait:
|
lld_lcdWriteReg(0x46, (((x+cx-1) << 8) & 0xFF00 ) | (x & 0x00FF));
|
||||||
lld_lcdWriteReg(0x46, (((x+cx-1) << 8) & 0xFF00 ) | (x & 0x00FF));
|
lld_lcdWriteReg(0x48, y & 0x01FF);
|
||||||
lld_lcdWriteReg(0x48, y & 0x01FF);
|
lld_lcdWriteReg(0x47, (y+cy-1) & 0x01FF);
|
||||||
lld_lcdWriteReg(0x47, (y+cy-1) & 0x01FF);
|
break;
|
||||||
break;
|
case landscape:
|
||||||
case landscape:
|
lld_lcdWriteReg(0x46, (((x+cx-1) << 8) & 0xFF00) | ((y+cy) & 0x00FF));
|
||||||
lld_lcdWriteReg(0x46, (((x+cx-1) << 8) & 0xFF00) | ((y+cy) & 0x00FF));
|
lld_lcdWriteReg(0x48, x & 0x01FF);
|
||||||
lld_lcdWriteReg(0x48, x & 0x01FF);
|
lld_lcdWriteReg(0x47, (x+cx-1) & 0x01FF);
|
||||||
lld_lcdWriteReg(0x47, (x+cx-1) & 0x01FF);
|
break;
|
||||||
break;
|
case portraitInv:
|
||||||
case portraitInv:
|
lld_lcdWriteReg(0x46, (((SCREEN_WIDTH-x-1) & 0x00FF) << 8) | ((SCREEN_WIDTH - (x+cx)) & 0x00FF));
|
||||||
lld_lcdWriteReg(0x46, (((SCREEN_WIDTH-x-1) & 0x00FF) << 8) | ((SCREEN_WIDTH - (x+cx)) & 0x00FF));
|
lld_lcdWriteReg(0x48, (SCREEN_HEIGHT-(y+cy)) & 0x01FF);
|
||||||
lld_lcdWriteReg(0x48, (SCREEN_HEIGHT-(y+cy)) & 0x01FF);
|
lld_lcdWriteReg(0x47, (SCREEN_HEIGHT-y-1) & 0x01FF);
|
||||||
lld_lcdWriteReg(0x47, (SCREEN_HEIGHT-y-1) & 0x01FF);
|
break;
|
||||||
break;
|
case landscapeInv:
|
||||||
case landscapeInv:
|
lld_lcdWriteReg(0x46, (((SCREEN_WIDTH - y - 1) & 0x00FF) << 8) | ((SCREEN_WIDTH - (y+cy)) & 0x00FF));
|
||||||
lld_lcdWriteReg(0x46, (((SCREEN_WIDTH - y - 1) & 0x00FF) << 8) | ((SCREEN_WIDTH - (y+cy)) & 0x00FF));
|
lld_lcdWriteReg(0x48, (SCREEN_HEIGHT - (x+cx)) & 0x01FF);
|
||||||
lld_lcdWriteReg(0x48, (SCREEN_HEIGHT - (x+cx)) & 0x01FF);
|
lld_lcdWriteReg(0x47, (SCREEN_HEIGHT - x - 1) & 0x01FF);
|
||||||
lld_lcdWriteReg(0x47, (SCREEN_HEIGHT - x - 1) & 0x01FF);
|
break;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
lld_lcdSetCursor(x, y);
|
||||||
lld_lcdSetCursor(x, y);
|
}
|
||||||
}
|
|
||||||
|
static void lld_lcdResetViewPort(void) {
|
||||||
static void lld_lcdResetViewPort(void) {
|
switch(GDISP.Orientation) {
|
||||||
switch(GDISP.Orientation) {
|
case portrait:
|
||||||
case portrait:
|
case portraitInv:
|
||||||
case portraitInv:
|
lld_lcdSetViewPort(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
lld_lcdSetViewPort(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
break;
|
||||||
break;
|
case landscape:
|
||||||
case landscape:
|
case landscapeInv:
|
||||||
case landscapeInv:
|
lld_lcdSetViewPort(0, 0, SCREEN_HEIGHT, SCREEN_WIDTH);
|
||||||
lld_lcdSetViewPort(0, 0, SCREEN_HEIGHT, SCREEN_WIDTH);
|
break;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
#endif /* S6D1121_H */
|
||||||
#endif /* S6D1121_H */
|
|
||||||
=======
|
|
||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2012
|
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
|
||||||
|
|
||||||
This file is part of ChibiOS-LCD-Driver.
|
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS-LCD-Driver is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef S6D1121_H
|
|
||||||
#define S6D1121_H
|
|
||||||
|
|
||||||
// I/O assignments
|
|
||||||
#define LCD_BL_GPIO GPIOB
|
|
||||||
#define LCD_BL_PIN 8
|
|
||||||
|
|
||||||
#define LCD_CS_GPIO GPIOD
|
|
||||||
#define LCD_CS_PIN 7
|
|
||||||
|
|
||||||
#define LCD_RS_GPIO GPIOD
|
|
||||||
#define LCD_RS_PIN 11
|
|
||||||
|
|
||||||
#define LCD_RST_GPIO GPIOD
|
|
||||||
#define LCD_RST_PIN 10
|
|
||||||
|
|
||||||
#define LCD_RD_GPIO GPIOD
|
|
||||||
#define LCD_RD_PIN 9
|
|
||||||
|
|
||||||
#define LCD_WR_GPIO GPIOD
|
|
||||||
#define LCD_WR_PIN 8
|
|
||||||
|
|
||||||
#define LCD_D0_GPIO GPIOD
|
|
||||||
#define LCD_D4_GPIO GPIOE
|
|
||||||
|
|
||||||
/* all interfaces use RST via GPIO */
|
|
||||||
/* TODO: option to disable RST; assumes RST is tied high */
|
|
||||||
#define LCD_RST_LOW palClearPad(LCD_RST_GPIO, LCD_RST_PIN)
|
|
||||||
#define LCD_RST_HIGH palSetPad(LCD_RST_GPIO, LCD_RST_PIN)
|
|
||||||
|
|
||||||
#define s6d1121_delay(n) halPolledDelay(MS2RTT(n));
|
|
||||||
|
|
||||||
#if defined(LCD_USE_GPIO)
|
|
||||||
|
|
||||||
#define LCD_CS_LOW palClearPad(LCD_CS_GPIO, LCD_CS_PIN)
|
|
||||||
#define LCD_CS_HIGH palSetPad(LCD_CS_GPIO, LCD_CS_PIN)
|
|
||||||
|
|
||||||
#define LCD_RS_LOW palClearPad(LCD_RS_GPIO, LCD_RS_PIN)
|
|
||||||
#define LCD_RS_HIGH palSetPad(LCD_RS_GPIO, LCD_RS_PIN)
|
|
||||||
|
|
||||||
#define LCD_RD_LOW palClearPad(LCD_RD_GPIO, LCD_RD_PIN)
|
|
||||||
#define LCD_RD_HIGH palSetPad(LCD_RD_GPIO, LCD_RD_PIN)
|
|
||||||
|
|
||||||
#define LCD_WR_LOW palClearPad(LCD_WR_GPIO, LCD_WR_PIN)
|
|
||||||
#define LCD_WR_HIGH palSetPad(LCD_WR_GPIO, LCD_WR_PIN)
|
|
||||||
|
|
||||||
#define LCD_BL_LOW palClearPad(LCD_BL_GPIO, LCD_BL_PIN)
|
|
||||||
#define LCD_BL_HIGH palSetPad(LCD_BL_GPIO, LCD_BL_PIN)
|
|
||||||
|
|
||||||
|
|
||||||
static inline void lld_lcddelay(void) { asm volatile ("nop"); asm volatile ("nop"); }
|
|
||||||
static inline void lld_lcdwrite(uint16_t db) {
|
|
||||||
LCD_D4_GPIO->BSRR.W=((~db&0xFFF0)<<16)|(db&0xFFF0);
|
|
||||||
LCD_D0_GPIO->BSRR.W=((~db&0x000F)<<16)|(db&0x000F);
|
|
||||||
LCD_WR_LOW;
|
|
||||||
lld_lcddelay();
|
|
||||||
LCD_WR_HIGH;
|
|
||||||
}
|
|
||||||
static __inline uint16_t lld_lcdReadData(void) {
|
|
||||||
uint16_t value=0;
|
|
||||||
|
|
||||||
LCD_RS_HIGH; LCD_WR_HIGH; LCD_RD_LOW;
|
|
||||||
#ifndef STM32F4XX
|
|
||||||
// change pin mode to digital input
|
|
||||||
LCD_DATA_PORT->CRH = 0x47444444;
|
|
||||||
LCD_DATA_PORT->CRL = 0x47444444;
|
|
||||||
#endif
|
|
||||||
#ifndef STM32F4XX
|
|
||||||
// change pin mode back to digital output
|
|
||||||
LCD_DATA_PORT->CRH = 0x33333333;
|
|
||||||
LCD_DATA_PORT->CRL = 0x33333333;
|
|
||||||
#endif
|
|
||||||
LCD_RD_HIGH;
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
|
|
||||||
uint16_t lcdRAM;
|
|
||||||
|
|
||||||
LCD_CS_LOW; LCD_RS_LOW;
|
|
||||||
lld_lcdwrite(lcdReg);
|
|
||||||
LCD_RS_HIGH;
|
|
||||||
lcdRAM = lld_lcdReadData();
|
|
||||||
LCD_CS_HIGH;
|
|
||||||
return lcdRAM;
|
|
||||||
}
|
|
||||||
static void lld_lcdWriteIndex(uint16_t lcdReg) {
|
|
||||||
LCD_RS_LOW;
|
|
||||||
lld_lcdwrite(lcdReg);
|
|
||||||
LCD_RS_HIGH;
|
|
||||||
}
|
|
||||||
static void lld_lcdWriteData(uint16_t lcdData) {
|
|
||||||
lld_lcdwrite(lcdData);
|
|
||||||
}
|
|
||||||
static void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
|
|
||||||
LCD_CS_LOW;
|
|
||||||
lld_lcdWriteIndex(lcdReg);
|
|
||||||
lld_lcdWriteData(lcdRegValue);
|
|
||||||
LCD_CS_HIGH;
|
|
||||||
}
|
|
||||||
static __inline void lld_lcdWriteStreamStart(void) {
|
|
||||||
LCD_CS_LOW;
|
|
||||||
lld_lcdWriteIndex(0x0022);
|
|
||||||
}
|
|
||||||
static __inline void lld_lcdWriteStreamStop(void) {
|
|
||||||
LCD_CS_HIGH;
|
|
||||||
}
|
|
||||||
static __inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
|
|
||||||
uint16_t i;
|
|
||||||
|
|
||||||
for(i = 0; i < size; i++) { lld_lcdwrite(buffer[i]); }
|
|
||||||
}
|
|
||||||
static __inline void lld_lcdReadStreamStart(void) { /* TODO */ }
|
|
||||||
static __inline void lld_lcdReadStreamStop(void) { /* TODO */ }
|
|
||||||
static __inline void lld_lcdReadStream(uint16_t *UNUSED(buffer), size_t UNUSED(size)) { /* TODO */ }
|
|
||||||
|
|
||||||
#elif defined(LCD_USE_FSMC)
|
|
||||||
#define LCD_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
|
|
||||||
#define LCD_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
|
|
||||||
|
|
||||||
static __inline void lld_lcdWriteIndex(uint16_t index) { LCD_REG = index; }
|
|
||||||
static __inline void lld_lcdWriteData(uint16_t data) { LCD_RAM = data; }
|
|
||||||
static __inline void lld_lcdWriteReg(uint16_t lcdReg,uint16_t lcdRegValue) {
|
|
||||||
LCD_REG = lcdReg;
|
|
||||||
LCD_RAM = lcdRegValue;
|
|
||||||
}
|
|
||||||
static __inline uint16_t lld_lcdReadData(void) { return (LCD_RAM); }
|
|
||||||
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
|
|
||||||
LCD_REG = lcdReg;
|
|
||||||
return LCD_RAM;
|
|
||||||
}
|
|
||||||
static __inline void lld_lcdWriteStreamStart(void) { LCD_REG = 0x0022; }
|
|
||||||
static __inline void lld_lcdWriteStreamStop(void) {}
|
|
||||||
static __inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
|
|
||||||
uint16_t i;
|
|
||||||
for(i = 0; i < size; i++) LCD_RAM = buffer[i];
|
|
||||||
}
|
|
||||||
static __inline void lld_lcdReadStreamStart(void) { LCD_REG = 0x0022; }
|
|
||||||
static __inline void lld_lcdReadStreamStop(void) {}
|
|
||||||
static __inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
|
|
||||||
uint16_t i;
|
|
||||||
volatile uint16_t dummy;
|
|
||||||
|
|
||||||
/* throw away first value read */
|
|
||||||
dummy = LCD_RAM;
|
|
||||||
for(i = 0; i < size; i++) buffer[i] = LCD_RAM;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(LCD_USE_SPI)
|
|
||||||
#error "gdispS6d1121: LCD_USE_SPI not implemented yet"
|
|
||||||
|
|
||||||
#else
|
|
||||||
#error "gdispS6d1121: No known LCD_USE_XXX has been defined"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void lld_lcdSetCursor(coord_t x, coord_t y) {
|
|
||||||
/* R20h - 8 bit
|
|
||||||
* R21h - 9 bit
|
|
||||||
*/
|
|
||||||
switch(GDISP.Orientation) {
|
|
||||||
case portraitInv:
|
|
||||||
lld_lcdWriteReg(0x0020, (SCREEN_WIDTH-1-x) & 0x00FF);
|
|
||||||
lld_lcdWriteReg(0x0021, (SCREEN_HEIGHT-1-y) & 0x01FF);
|
|
||||||
break;
|
|
||||||
case portrait:
|
|
||||||
lld_lcdWriteReg(0x0020, x & 0x00FF);
|
|
||||||
lld_lcdWriteReg(0x0021, y & 0x01FF);
|
|
||||||
break;
|
|
||||||
case landscape:
|
|
||||||
lld_lcdWriteReg(0x0020, y & 0x00FF);
|
|
||||||
lld_lcdWriteReg(0x0021, x & 0x01FF);
|
|
||||||
break;
|
|
||||||
case landscapeInv:
|
|
||||||
lld_lcdWriteReg(0x0020, (SCREEN_WIDTH - y - 1) & 0x00FF);
|
|
||||||
lld_lcdWriteReg(0x0021, (SCREEN_HEIGHT - x - 1) & 0x01FF);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy) {
|
|
||||||
/* HSA / HEA are 8 bit
|
|
||||||
* VSA / VEA are 9 bit
|
|
||||||
* use masks 0x00FF and 0x01FF to enforce this
|
|
||||||
*/
|
|
||||||
|
|
||||||
switch(GDISP.Orientation) {
|
|
||||||
case portrait:
|
|
||||||
lld_lcdWriteReg(0x46, (((x+cx-1) << 8) & 0xFF00 ) | (x & 0x00FF));
|
|
||||||
lld_lcdWriteReg(0x48, y & 0x01FF);
|
|
||||||
lld_lcdWriteReg(0x47, (y+cy-1) & 0x01FF);
|
|
||||||
break;
|
|
||||||
case landscape:
|
|
||||||
lld_lcdWriteReg(0x46, (((x+cx-1) << 8) & 0xFF00) | ((y+cy) & 0x00FF));
|
|
||||||
lld_lcdWriteReg(0x48, x & 0x01FF);
|
|
||||||
lld_lcdWriteReg(0x47, (x+cx-1) & 0x01FF);
|
|
||||||
break;
|
|
||||||
case portraitInv:
|
|
||||||
lld_lcdWriteReg(0x46, (((SCREEN_WIDTH-x-1) & 0x00FF) << 8) | ((SCREEN_WIDTH - (x+cx)) & 0x00FF));
|
|
||||||
lld_lcdWriteReg(0x48, (SCREEN_HEIGHT-(y+cy)) & 0x01FF);
|
|
||||||
lld_lcdWriteReg(0x47, (SCREEN_HEIGHT-y-1) & 0x01FF);
|
|
||||||
break;
|
|
||||||
case landscapeInv:
|
|
||||||
lld_lcdWriteReg(0x46, (((SCREEN_WIDTH - y - 1) & 0x00FF) << 8) | ((SCREEN_WIDTH - (y+cy)) & 0x00FF));
|
|
||||||
lld_lcdWriteReg(0x48, (SCREEN_HEIGHT - (x+cx)) & 0x01FF);
|
|
||||||
lld_lcdWriteReg(0x47, (SCREEN_HEIGHT - x - 1) & 0x01FF);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
lld_lcdSetCursor(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lld_lcdResetViewPort(void) {
|
|
||||||
switch(GDISP.Orientation) {
|
|
||||||
case portrait:
|
|
||||||
case portraitInv:
|
|
||||||
lld_lcdSetViewPort(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
|
||||||
break;
|
|
||||||
case landscape:
|
|
||||||
case landscapeInv:
|
|
||||||
lld_lcdSetViewPort(0, 0, SCREEN_HEIGHT, SCREEN_WIDTH);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* S6D1121_H */
|
|
||||||
>>>>>>> d61cff7a7976cd9097e5c3634ae4b1be64f736c3
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ void gdisp_lld_drawpixel(coord_t UNUSED(x), coord_t UNUSED(y), color_t UNUSED(co
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GDISP_HARDWARE_CONTROL || defined(__DOXYGEN__)
|
#if (GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL) || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @brief Driver Control
|
* @brief Driver Control
|
||||||
* @detail Unsupported control codes are ignored.
|
* @detail Unsupported control codes are ignored.
|
||||||
|
|
|
@ -59,26 +59,6 @@
|
||||||
#define Pink HTML2COLOR(0xFFC0CB)
|
#define Pink HTML2COLOR(0xFFC0CB)
|
||||||
#define SkyBlue HTML2COLOR(0x87CEEB)
|
#define SkyBlue HTML2COLOR(0x87CEEB)
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Driver Control Constants
|
|
||||||
* @detail Unsupported control codes are ignored.
|
|
||||||
* @note The value parameter should always be typecast to (void *).
|
|
||||||
* @note There are some predefined and some specific to the low level driver.
|
|
||||||
* @note GDISP_CONTROL_POWER - Takes a gdisp_powermode_t
|
|
||||||
* GDISP_CONTROL_ORIENTATION - Takes a gdisp_orientation_t
|
|
||||||
* GDISP_CONTROL_BACKLIGHT - Takes an int from 0 to 100. For a driver
|
|
||||||
* that only supports off/on anything other
|
|
||||||
* than zero is on.
|
|
||||||
* GDISP_CONTROL_CONTRAST - Takes an int from 0 to 100.
|
|
||||||
* GDISP_CONTROL_LLD - Low level driver control constants start at
|
|
||||||
* this value.
|
|
||||||
*/
|
|
||||||
#define GDISP_CONTROL_POWER 0
|
|
||||||
#define GDISP_CONTROL_ORIENTATION 1
|
|
||||||
#define GDISP_CONTROL_BACKLIGHT 2
|
|
||||||
#define GDISP_CONTROL_CONTRAST 3
|
|
||||||
#define GDISP_CONTROL_LLD 1000
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -36,6 +36,30 @@
|
||||||
|
|
||||||
#include "gdisp_lld_config.h"
|
#include "gdisp_lld_config.h"
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Constants. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Driver Control Constants
|
||||||
|
* @detail Unsupported control codes are ignored.
|
||||||
|
* @note The value parameter should always be typecast to (void *).
|
||||||
|
* @note There are some predefined and some specific to the low level driver.
|
||||||
|
* @note GDISP_CONTROL_POWER - Takes a gdisp_powermode_t
|
||||||
|
* GDISP_CONTROL_ORIENTATION - Takes a gdisp_orientation_t
|
||||||
|
* GDISP_CONTROL_BACKLIGHT - Takes an int from 0 to 100. For a driver
|
||||||
|
* that only supports off/on anything other
|
||||||
|
* than zero is on.
|
||||||
|
* GDISP_CONTROL_CONTRAST - Takes an int from 0 to 100.
|
||||||
|
* GDISP_CONTROL_LLD - Low level driver control constants start at
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
#define GDISP_CONTROL_POWER 0
|
||||||
|
#define GDISP_CONTROL_ORIENTATION 1
|
||||||
|
#define GDISP_CONTROL_BACKLIGHT 2
|
||||||
|
#define GDISP_CONTROL_CONTRAST 3
|
||||||
|
#define GDISP_CONTROL_LLD 1000
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Error checks. */
|
/* Error checks. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -45,13 +45,21 @@ enum powermode {powerOff, powerOn, sleepOn, sleepOff};
|
||||||
#define sleepOn powerSleep
|
#define sleepOn powerSleep
|
||||||
#define sleepOff powerOn
|
#define sleepOff powerOn
|
||||||
|
|
||||||
#define font_Small (&fontSmall)
|
#define font_Small (&fontSmall)
|
||||||
#define font_Larger (&fontLarger)
|
#define font_SmallDouble (&fontSmallDouble)
|
||||||
#define font_MediumBold (&fontUI1)
|
#define font_SmallNarrow (&fontSmall)
|
||||||
#define font_LargeNumbers (&fontLargeNumbers)
|
#define font_Larger (&fontLarger)
|
||||||
|
#define font_LargerDouble (&fontLargerDouble)
|
||||||
|
#define font_LargerNarrow (&fontLargerNarrow)
|
||||||
|
#define font_MediumBold (&fontUI1)
|
||||||
|
#define font_MediumBoldDouble (&fontUI1Double)
|
||||||
|
#define font_MediumBoldNarrow (&fontUI1Narrow)
|
||||||
|
#define font_LargeNumbers (&fontLargeNumbers)
|
||||||
|
#define font_LargeNumbersDouble (&fontLargeNumbersDouble)
|
||||||
|
#define font_LargeNumbersNarrow (&fontLargeNumbersNarrow)
|
||||||
|
|
||||||
#define GLCDDriver GDISPDriver
|
#define GLCDDriver GDISPDriver
|
||||||
#define GLCDD1 GDISP1
|
#define GLCDD GDISP
|
||||||
|
|
||||||
enum glcd_result { GLCD_DONE,
|
enum glcd_result { GLCD_DONE,
|
||||||
GLCD_FAILED,
|
GLCD_FAILED,
|
||||||
|
@ -63,10 +71,10 @@ typedef enum glcd_result glcd_result_t;
|
||||||
/* Core functions */
|
/* Core functions */
|
||||||
#define lcdInit(dvr) gdispInit(dvr)
|
#define lcdInit(dvr) gdispInit(dvr)
|
||||||
#define lcdClear(color) (gdispClear(color), GLCD_DONE)
|
#define lcdClear(color) (gdispClear(color), GLCD_DONE)
|
||||||
#define lcdSetOrientation(newO) (gdispSetOrientation(newO), (GDISP1.Orientation == (newO) ? GLCD_DONE : GLCD_FAILED))
|
#define lcdSetOrientation(newO) (gdispControl(GDISP_CONTROL_ORIENTATION, (void *)(int)newO), (GDISP1.Orientation == (newO) ? GLCD_DONE : GLCD_FAILED))
|
||||||
#define lcdFillArea(x0,y0,x1,y1,c) (gdispFillArea((x0),(y0),(x1)-(x0)+1,(y1)-(y0)+1,(c)), GLCD_DONE)
|
#define lcdFillArea(x0,y0,x1,y1,c) (gdispFillArea((x0),(y0),(x1)-(x0)+1,(y1)-(y0)+1,(c)), GLCD_DONE)
|
||||||
#define lcdWriteArea(x0,y0,x1,y1,b,n) (gdispBlitArea((x0),(y0),(x1)-(x0)+1,(y1)-(y0)+1,(b)), GLCD_DONE)
|
#define lcdWriteArea(x0,y0,x1,y1,b,n) (gdispBlitArea((x0),(y0),(x1)-(x0)+1,(y1)-(y0)+1,(b)), GLCD_DONE)
|
||||||
#define lcdSetPowerMode(pm) (gdispSetPowerMode(pm), (GDISP1.Powermode == (pm) ? GLCD_DONE : GLCD_FAILED))
|
#define lcdSetPowerMode(pm) (gdispControl(GDISP_CONTROL_POWER, (void *)(int)pm), (GDISP1.Powermode == (pm) ? GLCD_DONE : GLCD_FAILED))
|
||||||
|
|
||||||
/* Drawing functions */
|
/* Drawing functions */
|
||||||
#define lcdDrawPixel(x,y,c) (gdispDrawPixel((x),(y),(c)), GLCD_DONE)
|
#define lcdDrawPixel(x,y,c) (gdispDrawPixel((x),(y),(c)), GLCD_DONE)
|
||||||
|
@ -83,12 +91,12 @@ typedef enum glcd_result glcd_result_t;
|
||||||
/* Character measuring functions */
|
/* Character measuring functions */
|
||||||
#define lcdMeasureChar(h,f) (gdispGetCharWidth((h),(f))+(f)->charPadding)
|
#define lcdMeasureChar(h,f) (gdispGetCharWidth((h),(f))+(f)->charPadding)
|
||||||
#define lcdMeasureString(s,f) (gdispGetStringWidth((s),(f))+(f)->charPadding)
|
#define lcdMeasureString(s,f) (gdispGetStringWidth((s),(f))+(f)->charPadding)
|
||||||
#define lcdGetFontHeight(font) gdispGetFontMetric(font, fontHeight)
|
#define lcdGetFontHeight(f) gdispGetFontMetric((f), fontHeight)
|
||||||
|
|
||||||
/* Size and orientation related */
|
/* Size and orientation related */
|
||||||
#define lcdGetHeight() (GDISP1.Height)
|
#define lcdGetHeight() (GDISP.Height)
|
||||||
#define lcdGetWidth() (GDISP1.Width)
|
#define lcdGetWidth() (GDISP.Width)
|
||||||
#define lcdGetOrientation() (GDISP1.Orientation)
|
#define lcdGetOrientation() (GDISP.Orientation)
|
||||||
|
|
||||||
/* BGR->RGB and pixel readback */
|
/* BGR->RGB and pixel readback */
|
||||||
#define lcdBGR2RGB(c) RGB2COLOR(BLUE_OF(c),GREEN_OF(c),RED_OF(c))
|
#define lcdBGR2RGB(c) RGB2COLOR(BLUE_OF(c),GREEN_OF(c),RED_OF(c))
|
||||||
|
|
Loading…
Add table
Reference in a new issue