summaryrefslogtreecommitdiff
path: root/drivers/painter/gc9a01
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-10-22 13:27:31 +1100
committerGitHub <noreply@github.com>2023-10-22 13:27:31 +1100
commit8e614250b4b44a14a6a8c93bea3a6d1fd02790cf (patch)
tree15c000b7765082911a3a6d84b1499b51c25f43d8 /drivers/painter/gc9a01
parent48d9140cfc197d6f4c54bf8022902d28fac37624 (diff)
[QP] Add support for OLED, variable framebuffer bpp (#19997)
Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com> Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> Fixup delta frame coordinates after #20296.
Diffstat (limited to 'drivers/painter/gc9a01')
-rw-r--r--drivers/painter/gc9a01/qp_gc9a01.c16
-rw-r--r--drivers/painter/gc9a01/qp_gc9a01.h1
-rw-r--r--drivers/painter/gc9a01/qp_gc9a01_opcodes.h1
3 files changed, 8 insertions, 10 deletions
diff --git a/drivers/painter/gc9a01/qp_gc9a01.c b/drivers/painter/gc9a01/qp_gc9a01.c
index a2eb2cf57c..fe6fa7a9d0 100644
--- a/drivers/painter/gc9a01/qp_gc9a01.c
+++ b/drivers/painter/gc9a01/qp_gc9a01.c
@@ -2,7 +2,6 @@
// Copyright 2023 Nick Brassel (@tzarc)
// SPDX-License-Identifier: GPL-2.0-or-later
-#include <wait.h>
#include "qp_internal.h"
#include "qp_comms.h"
#include "qp_gc9a01.h"
@@ -135,13 +134,14 @@ painter_device_t qp_gc9a01_make_spi_device(uint16_t panel_width, uint16_t panel_
driver->base.offset_y = 0;
// SPI and other pin configuration
- driver->base.comms_config = &driver->spi_dc_reset_config;
- driver->spi_dc_reset_config.spi_config.chip_select_pin = chip_select_pin;
- driver->spi_dc_reset_config.spi_config.divisor = spi_divisor;
- driver->spi_dc_reset_config.spi_config.lsb_first = false;
- driver->spi_dc_reset_config.spi_config.mode = spi_mode;
- driver->spi_dc_reset_config.dc_pin = dc_pin;
- driver->spi_dc_reset_config.reset_pin = reset_pin;
+ driver->base.comms_config = &driver->spi_dc_reset_config;
+ driver->spi_dc_reset_config.spi_config.chip_select_pin = chip_select_pin;
+ driver->spi_dc_reset_config.spi_config.divisor = spi_divisor;
+ driver->spi_dc_reset_config.spi_config.lsb_first = false;
+ driver->spi_dc_reset_config.spi_config.mode = spi_mode;
+ driver->spi_dc_reset_config.dc_pin = dc_pin;
+ driver->spi_dc_reset_config.reset_pin = reset_pin;
+ driver->spi_dc_reset_config.command_params_uses_command_pin = false;
if (!qp_internal_register_device((painter_device_t)driver)) {
memset(driver, 0, sizeof(tft_panel_dc_reset_painter_device_t));
diff --git a/drivers/painter/gc9a01/qp_gc9a01.h b/drivers/painter/gc9a01/qp_gc9a01.h
index e2b1939564..31a3804b50 100644
--- a/drivers/painter/gc9a01/qp_gc9a01.h
+++ b/drivers/painter/gc9a01/qp_gc9a01.h
@@ -1,6 +1,5 @@
// Copyright 2021 Paul Cotter (@gr1mr3aver)
// SPDX-License-Identifier: GPL-2.0-or-later
-
#pragma once
#include "gpio.h"
diff --git a/drivers/painter/gc9a01/qp_gc9a01_opcodes.h b/drivers/painter/gc9a01/qp_gc9a01_opcodes.h
index 6ff4efe7a8..828e42752b 100644
--- a/drivers/painter/gc9a01/qp_gc9a01_opcodes.h
+++ b/drivers/painter/gc9a01/qp_gc9a01_opcodes.h
@@ -1,6 +1,5 @@
// Copyright 2021 Paul Cotter (@gr1mr3aver)
// SPDX-License-Identifier: GPL-2.0-or-later
-
#pragma once
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////