Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of sharp_mlcd by
Revision 2:9898a647e88b, committed 2018-03-20
- Comitter:
- noripyon
- Date:
- Tue Mar 20 04:46:28 2018 +0000
- Parent:
- 1:f8ba3b236d12
- Commit message:
- sharp mlcd driver modified to support large font
Changed in this revision
| sharp_mlcd.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/sharp_mlcd.cpp Sun May 11 14:03:39 2014 +0000
+++ b/sharp_mlcd.cpp Tue Mar 20 04:46:28 2018 +0000
@@ -433,11 +433,13 @@
if ((c < 31) || (c > 127)) return; // test char range
// read font parameter from start of array
- offset = font[0]; // bytes / char
+// offset = font[0]; // bytes / char
+ offset = (font[4]<<8) + font[0]; // bytes / char
hor = font[1]; // get hor size of font
vert = font[2]; // get vert size of font
bpl = font[3]; // bytes per line
+
if (char_x + hor > width()) {
char_x = 0;
char_y = char_y + vert;
@@ -446,7 +448,9 @@
}
}
- zeichen = &font[((c -32) * offset) + 4]; // start of char bitmap
+// zeichen = &font[((c -32) * offset) + 4]; // start of char bitmap
+ zeichen = &font[((c -32) * offset) + 5]; // start of char bitmap
+
w = zeichen[0]; // width of actual char
// construct the char into the buffer
for (j=0; j<vert; j++) { // vert line
