From: David Odin Date: Thu, 30 Mar 2017 20:43:39 +0000 (+0200) Subject: fixed the ssd130x_update_tile function about a (x0,y0) / (xt,yt) mismatch X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=d70f1092a22bbfec2d64e060f4a734cda73aee54;p=soft%2Flpc122x%2Fcore fixed the ssd130x_update_tile function about a (x0,y0) / (xt,yt) mismatch --- diff --git a/extdrv/ssd130x_oled_driver.c b/extdrv/ssd130x_oled_driver.c index 46f7140..ef4ade2 100644 --- a/extdrv/ssd130x_oled_driver.c +++ b/extdrv/ssd130x_oled_driver.c @@ -377,7 +377,7 @@ int ssd130x_display_full_screen(struct oled_display* conf) */ int ssd130x_update_tile(struct oled_display* conf, uint8_t x0, uint8_t y0) { - uint8_t* addr = gddram_start + ((y0 >> 3) * 128) + x0; + uint8_t* addr = gddram_start + (y0 * 128) + x0 * 8; int ret = 0; ret = ssd130x_set_column_address(conf, (x0 * 8), (((x0 + 1) * 8) - 1));