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:
ba79b82
)
Add macro for RGB conversion
author
Nathael Pajani
<nathael.pajani@ed3l.fr>
Thu, 24 Sep 2020 11:09:40 +0000
(13:09 +0200)
committer
Nathael Pajani
<nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000
(17:03 +0100)
include/extdrv/st7735_tft_driver.h
patch
|
blob
|
history
diff --git
a/include/extdrv/st7735_tft_driver.h
b/include/extdrv/st7735_tft_driver.h
index
aa68c54
..
051c8ca
100644
(file)
--- a/
include/extdrv/st7735_tft_driver.h
+++ b/
include/extdrv/st7735_tft_driver.h
@@
-85,6
+85,11
@@
struct st7735_ops {
int (*erase_display)(struct st7735_display* conf);
};
+#define RGB_MSB_TO_16bits_565(r, g, b) \
+ (uint16_t)( ((((uint16_t)(r)) ) & 0x00F8) | \
+ (((((uint16_t)(g)) << 11) & 0xE000) | ((((uint16_t)(g)) >> 5) & 0x0003)) | \
+ ((((uint16_t)(b)) << 5) & 0x1F00) )
+
/* Note that GM should be '11' for 128x160 screens and '00' for 132x162 screens */
enum st77xx_defs {
ST77xx_NOP = 0x00, /* No operation */
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 !