Git
Wiki
Site
projects
/
soft
/
lpc122x
/
core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
242024c
)
fixed the set_pixel function
author
David Odin
<david@forma3dev.fr>
Mon, 27 Mar 2017 15:44:11 +0000
(17:44 +0200)
committer
Nathael Pajani
<nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000
(17:03 +0100)
extdrv/ssd130x_oled_driver.c
patch
|
blob
|
history
diff --git
a/extdrv/ssd130x_oled_driver.c
b/extdrv/ssd130x_oled_driver.c
index
06c0d68
..
46f7140
100644
(file)
--- a/
extdrv/ssd130x_oled_driver.c
+++ b/
extdrv/ssd130x_oled_driver.c
@@
-403,11
+403,11
@@
int ssd130x_update_modified(struct oled_display* conf)
/* Change our internal buffer, without actually displaying the changes */
int ssd130x_set_pixel(struct oled_display* conf, uint8_t x0, uint8_t y0, uint8_t state)
{
- uint8_t* addr = gddram_start + ((y0
>> 3
) * 128) + x0;
+ uint8_t* addr = gddram_start + ((y0
/ 8
) * 128) + x0;
if (state != 0) {
- *addr |= (0x01 << (
7 - (x0 & 0x03)
));
+ *addr |= (0x01 << (
y0 % 8
));
} else {
- *addr &= ~(0x01 << (
7 - (x0 & 0x03)
));
+ *addr &= ~(0x01 << (
y0 % 8
));
}
return 0;
}
Techno-Innov
42 impasse de la Combe du Bois
01150 Blyes - France
contact@techno-innov.fr
Design et hébergement du site :
Techno-Innov
Techno-Innov
- SARL Coopérative
539 169 417 RCS Bourg-en-Bresse
Ce site n'utilise pas de cookies, désolé pour les gourmands !