projects
/
hackover2013-badge-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed issue for FreeBSD instantiation
[hackover2013-badge-firmware.git]
/
drivers
/
lcd
/
tft
/
drawing.c
diff --git
a/drivers/lcd/tft/drawing.c
b/drivers/lcd/tft/drawing.c
index
fe8956a
..
e90a8e6
100644
(file)
--- a/
drivers/lcd/tft/drawing.c
+++ b/
drivers/lcd/tft/drawing.c
@@
-71,7
+71,7
@@
void drawSwap(uint32_t a, uint32_t b)
@brief Draws a single bitmap character
*/
/**************************************************************************/
@brief Draws a single bitmap character
*/
/**************************************************************************/
-void drawCharBitmap(const uint16_t xPixel, const uint16_t yPixel, uint16_t color, const
uint8_t
*glyph, uint8_t cols, uint8_t rows)
+void drawCharBitmap(const uint16_t xPixel, const uint16_t yPixel, uint16_t color, const
char
*glyph, uint8_t cols, uint8_t rows)
{
uint16_t currentY, currentX, indexIntoGlyph;
uint16_t _row, _col, _colPages;
{
uint16_t currentY, currentX, indexIntoGlyph;
uint16_t _row, _col, _colPages;
@@
-350,7
+350,7
@@
void drawString(uint16_t x, uint16_t y, uint16_t color, const FONT_INFO *fontInf
// Send individual characters
// We need to manually calculate width in pages since this is screwy with variable width fonts
//uint8_t heightPages = charWidth % 8 ? charWidth / 8 : charWidth / 8 + 1;
// Send individual characters
// We need to manually calculate width in pages since this is screwy with variable width fonts
//uint8_t heightPages = charWidth % 8 ? charWidth / 8 : charWidth / 8 + 1;
- drawCharBitmap(currentX, y, color,
&fontInfo->data[charOffset]
, charWidth, fontInfo->height);
+ drawCharBitmap(currentX, y, color,
(const char *)(&fontInfo->data[charOffset])
, charWidth, fontInfo->height);
// next char X
currentX += charWidth + 1;
// next char X
currentX += charWidth + 1;
@@
-399,8
+399,8
@@
uint16_t drawGetStringWidth(const FONT_INFO *fontInfo, char *str)
}
}
}
}
- /* return the w
di
th */
- return width;
+ /* return the w
id
th */
+ return width
> 0 ? width - 1 : width
;
}
/**************************************************************************/
}
/**************************************************************************/
This page took
0.024878 seconds
and
4
git commands to generate.