From 5cdfcb08fbcaca99c92c157eb929a38ddf6415bb Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Mon, 15 Jun 2020 12:47:22 +0100 Subject: working 2nd display --- app/font8x8.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/font8x8.c') diff --git a/app/font8x8.c b/app/font8x8.c index 6d0eee1..4d49aa7 100644 --- a/app/font8x8.c +++ b/app/font8x8.c @@ -260,31 +260,31 @@ static uint8_t font8x8[][8] = { }; void -font8x8_put_ch (unsigned ch, unsigned x, unsigned y) +font8x8_put_ch (uint8_t * vram, unsigned ch, unsigned x, unsigned y) { unsigned shift = y & 7; unsigned page = y >> 3; x += page * SSD1306_WIDTH; - oled_blit_strip (x, x + 8, 0xff << shift, shift, font8x8[ch]); + oled_blit_strip (vram, x, x + 8, 0xff << shift, shift, font8x8[ch]); if (shift) { x += SSD1306_WIDTH; shift = 8 - shift; - oled_blit_strip (x, x + 8, 0xff >> shift, -shift, font8x8[ch]); + oled_blit_strip (vram, x, x + 8, 0xff >> shift, -shift, font8x8[ch]); } } void -font8x8_put_str (char *str, unsigned x, unsigned y) +font8x8_put_str (uint8_t * vram, char *str, unsigned x, unsigned y) { while (*str) { - font8x8_put_ch (*(str++), x, y); + font8x8_put_ch (vram, *(str++), x, y); x += 8; } } -- cgit v1.2.3