diff options
author | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-12-03 21:46:19 +0100 |
---|---|---|
committer | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-12-03 21:46:19 +0100 |
commit | 08b7ee440269c881546421da6efe1b6ae122b566 (patch) | |
tree | d3140184165f36acf49116e3a7886c15e5895e27 /include | |
parent | d46862a5bd2319c595b11427f781201ca063d194 (diff) |
Change pixel format
Diffstat (limited to 'include')
-rw-r--r-- | include/tft.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/tft.h b/include/tft.h index 22303a1..1e2fce2 100644 --- a/include/tft.h +++ b/include/tft.h @@ -114,9 +114,8 @@ tft_ram_wr(void) static inline void tft_pixel(uint8_t r, uint8_t g, uint8_t b) { - tft_data = r; - tft_data = g; - tft_data = b; + tft_data = (r << 3) | ((g & 0x38) >> 3); + tft_data = ((g & 0x07) << 5) | b & 0x1F; } void |