From 160b23f1b721d5308f81c2bff2283584eadb0137 Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Thu, 22 Oct 2020 22:00:01 +0200 Subject: [PATCH] Fixed pixel setting in black and white graphics driver --- openrtx/src/graphics/graphics_bw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openrtx/src/graphics/graphics_bw.c b/openrtx/src/graphics/graphics_bw.c index e45fa09d..2c68eac8 100644 --- a/openrtx/src/graphics/graphics_bw.c +++ b/openrtx/src/graphics/graphics_bw.c @@ -122,7 +122,8 @@ void _bw_setPixel(point_t pos, bw_t bw) */ uint16_t cell = (pos.x + pos.y*screen_width) / 8; uint16_t elem = (pos.x + pos.y*screen_width) % 8; - buf[cell] = buf[cell] & (bw << elem); + buf[cell] &= ~(1 << elem); + buf[cell] |= (bw << elem); } void gfx_setPixel(point_t pos, color_t color)