aboutsummaryrefslogtreecommitdiff
path: root/modules/ls0xx/ls0xx.h
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2025-05-08 23:31:12 -0600
committerJack Sangdahl <[email protected]>2025-05-08 23:31:12 -0600
commitb0c6852154b3060b639e8d7d87d16d17bd4dfcc4 (patch)
tree1bb641d18813c5450d63d25a3bd7e1f2b0c3c62e /modules/ls0xx/ls0xx.h
parent024f749e83ce97f003138f06dba2268cc18897c2 (diff)
downloadqmk_me-b0c6852154b3060b639e8d7d87d16d17bd4dfcc4.tar.gz
qmk_me-b0c6852154b3060b639e8d7d87d16d17bd4dfcc4.zip
Fix keymap function, add ls0xx module, other changes
Diffstat (limited to 'modules/ls0xx/ls0xx.h')
-rw-r--r--modules/ls0xx/ls0xx.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/ls0xx/ls0xx.h b/modules/ls0xx/ls0xx.h
new file mode 100644
index 0000000..49339e9
--- /dev/null
+++ b/modules/ls0xx/ls0xx.h
@@ -0,0 +1,27 @@
+// Copyright Pablo Martinez (@elpekenin) <[email protected]>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "qp.h"
+
+#ifndef LS0XX_NUM_DEVICES
+#define LS0XX_NUM_DEVICES 1
+#endif
+
+/**
+ * Factory method for an LS0XX SPI device.
+ *
+ * Args:
+ * panel_width: Width of the display
+ * panel_height: Height of the display
+ * chip_select_pin: GPIO pin used for SPI chip select (CS)
+ * spi_divisor: SPI divisor to use when communicating with the display
+ * spi_mode: SPI mode to use when communicating with the display
+ * buf: Address of the buffer where data will be stored
+ */
+painter_device_t qp_ls0xx_device_t_make_spi_device(uint16_t panel_width,
+ uint16_t panel_height,
+ pin_t chip_select_pin,
+ uint16_t spi_divisor,
+ int spi_mode, void *buf);