aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDasky <[email protected]>2024-09-18 12:44:33 +0100
committerGitHub <[email protected]>2024-09-18 21:44:33 +1000
commit49e339ba8d03e80f13190260ec92ba64bbb34998 (patch)
treec21ada655602b03f0a4075ce365bca62e84391ab /docs
parent7983f7409b3f002849a321757d9bf18533e931a5 (diff)
downloadqmk_firmware-49e339ba8d03e80f13190260ec92ba64bbb34998.tar.gz
qmk_firmware-49e339ba8d03e80f13190260ec92ba64bbb34998.zip
Add LD7032 support to QP. (#20828)
Co-authored-by: Nick Brassel <[email protected]> Co-authored-by: Sergey Vlasov <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/quantum_painter.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/quantum_painter.md b/docs/quantum_painter.md
index 1d844d0f94..782d496ff7 100644
--- a/docs/quantum_painter.md
+++ b/docs/quantum_painter.md
@@ -28,6 +28,8 @@ Supported devices:
| ILI9341 | RGB LCD | 240x320 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9341_spi` |
| ILI9486 | RGB LCD | 320x480 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9486_spi` |
| ILI9488 | RGB LCD | 320x480 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9488_spi` |
+| LD7032 (SPI) | Monochrome OLED | 128x40 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ld7032_spi` |
+| LD7032 (I2C) | Monochrome OLED | 128x40 | I2C | `QUANTUM_PAINTER_DRIVERS += ld7032_i2c` |
| SSD1351 | RGB OLED | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ssd1351_spi` |
| ST7735 | RGB LCD | 132x162, 80x160 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7735_spi` |
| ST7789 | RGB LCD | 240x320, 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7789_spi` |
@@ -478,6 +480,40 @@ Native color format mono2 is compatible with SH1106
SSD1306 and SH1106 are almost entirely identical, to the point of being indisinguishable by Quantum Painter. Enable SH1106 support in Quantum Painter and create SH1106 devices in firmware to perform drawing operations on SSD1306 displays.
+==== LD7032
+
+Enabling support for the LD7032 in Quantum Painter is done by adding the following to `rules.mk`:
+
+```make
+QUANTUM_PAINTER_ENABLE = yes
+# For SPI:
+QUANTUM_PAINTER_DRIVERS += ld7032_spi
+# For I2C:
+QUANTUM_PAINTER_DRIVERS += ld7032_i2c
+```
+
+Creating a SH1106 device in firmware can then be done with the following APIs:
+
+```c
+// SPI-based LD7032:
+painter_device_t qp_ld7032_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
+// I2C-based LD7032:
+painter_device_t qp_ld7032_make_i2c_device(uint16_t panel_width, uint16_t panel_height, uint8_t i2c_address);
+```
+
+The device handle returned from the `qp_ld7032_make_???_device` function can be used to perform all other drawing operations.
+
+The maximum number of displays of each type can be configured by changing the following in your `config.h` (default is 1):
+
+```c
+// 3 SPI displays:
+#define LD7032_NUM_SPI_DEVICES 3
+// 3 I2C displays:
+#define LD7032_NUM_I2C_DEVICES 3
+```
+
+Native color format mono2 is compatible with LD7032.
+
:::::
===== Surface