summaryrefslogtreecommitdiffstats
path: root/app/font8x16.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/font8x16.c')
-rw-r--r--app/font8x16.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/font8x16.c b/app/font8x16.c
index 48358f8..3591129 100644
--- a/app/font8x16.c
+++ b/app/font8x16.c
@@ -516,7 +516,7 @@ static uint8_t font8x16[][16] = {
};
void
-font8x16_put_ch (unsigned ch, unsigned x, unsigned y)
+font8x16_put_ch (uint8_t * vram, unsigned ch, unsigned x, unsigned y)
{
unsigned shift = y & 7;
unsigned page = y >> 3;
@@ -524,7 +524,7 @@ font8x16_put_ch (unsigned ch, unsigned x, unsigned y)
x += page * SSD1306_WIDTH;
- oled_blit_strip (x, x + 8, 0xff << shift, shift, font8x16[ch]);
+ oled_blit_strip (vram, x, x + 8, 0xff << shift, shift, font8x16[ch]);
x += SSD1306_WIDTH;
@@ -533,18 +533,19 @@ font8x16_put_ch (unsigned ch, unsigned x, unsigned y)
if (shift)
{
- oled_blit_strip (x, x + 8, mask, -shift, font8x16[ch]);
+ oled_blit_strip (vram, x, x + 8, mask, -shift, font8x16[ch]);
}
shift = y & 7;
- oled_blit_strip (x, x + 8, ~mask & (0xff << shift), shift,
+ oled_blit_strip (vram, x, x + 8, ~mask & (0xff << shift), shift,
&font8x16[ch][8]);
if (shift)
{
x += SSD1306_WIDTH;
shift = 8 - shift;
- oled_blit_strip (x, x + 8, 0xff >> shift, -shift, &font8x16[ch][8]);
+ oled_blit_strip (vram, x, x + 8, 0xff >> shift, -shift,
+ &font8x16[ch][8]);
}
@@ -552,11 +553,11 @@ font8x16_put_ch (unsigned ch, unsigned x, unsigned y)
void
-font8x16_put_str (char *str, unsigned x, unsigned y)
+font8x16_put_str (uint8_t * vram, char *str, unsigned x, unsigned y)
{
while (*str)
{
- font8x16_put_ch (*(str++), x, y);
+ font8x16_put_ch (vram, *(str++), x, y);
x += 8;
}
}