summaryrefslogtreecommitdiff
path: root/drivers/painter/generic
diff options
context:
space:
mode:
authorDavid Hoelscher <infinityis@users.noreply.github.com>2023-01-14 04:24:54 -0600
committerGitHub <noreply@github.com>2023-01-14 21:24:54 +1100
commit45851a10f66119ceff3baadde27f68e287eff481 (patch)
treefe482cc85723cbf6a626ddb2f346d916f60ce29b /drivers/painter/generic
parent5873fbe5690a008548c258840b273d0712495ed4 (diff)
Add RGB565 and RGB888 color support to Quantum Painter (#19382)
Diffstat (limited to 'drivers/painter/generic')
-rw-r--r--drivers/painter/generic/qp_rgb565_surface.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/painter/generic/qp_rgb565_surface.c b/drivers/painter/generic/qp_rgb565_surface.c
index c4de336535..474c86feec 100644
--- a/drivers/painter/generic/qp_rgb565_surface.c
+++ b/drivers/painter/generic/qp_rgb565_surface.c
@@ -164,6 +164,12 @@ static bool qp_rgb565_surface_append_pixels_rgb565(painter_device_t device, uint
return true;
}
+// Append data to the target location
+static bool qp_rgb565_surface_append_pixdata(painter_device_t device, uint8_t *target_buffer, uint32_t pixdata_offset, uint8_t pixdata_byte) {
+ target_buffer[pixdata_offset] = pixdata_byte;
+ return true;
+}
+
const struct painter_driver_vtable_t rgb565_surface_driver_vtable = {
.init = qp_rgb565_surface_init,
.power = qp_rgb565_surface_power,
@@ -173,6 +179,7 @@ const struct painter_driver_vtable_t rgb565_surface_driver_vtable = {
.viewport = qp_rgb565_surface_viewport,
.palette_convert = qp_rgb565_surface_palette_convert_rgb565_swapped,
.append_pixels = qp_rgb565_surface_append_pixels_rgb565,
+ .append_pixdata = qp_rgb565_surface_append_pixdata,
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////