logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

qp.h (23477B)


  1. // Copyright 2021-2023 Nick Brassel (@tzarc)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <stdint.h>
  5. #include <stdbool.h>
  6. #include "deferred_exec.h"
  7. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  8. // Quantum Painter global configurables (add to your keyboard's config.h)
  9. #ifndef QUANTUM_PAINTER_DISPLAY_TIMEOUT
  10. /**
  11. * @def This controls the amount of time (in milliseconds) that all displays will remain on after the last user input.
  12. * If set to 0, the display will remain on indefinitely.
  13. */
  14. # define QUANTUM_PAINTER_DISPLAY_TIMEOUT 30000
  15. #endif // QUANTUM_PAINTER_DISPLAY_TIMEOUT
  16. #ifndef QUANTUM_PAINTER_TASK_THROTTLE
  17. /**
  18. * @def This controls the amount of time (in milliseconds) that the Quantum Painter internal task will wait between
  19. * each execution.
  20. */
  21. # define QUANTUM_PAINTER_TASK_THROTTLE 1
  22. #endif // QUANTUM_PAINTER_TASK_THROTTLE
  23. #ifndef QUANTUM_PAINTER_NUM_IMAGES
  24. /**
  25. * @def This controls the maximum number of images that Quantum Painter can load at any one time. Images can be loaded
  26. * using \ref qp_load_image_mem, and can be unloaded by calling \ref qp_close_image. Increasing this number in
  27. * order to load more images increases the amount of RAM required. Image data is not held in RAM, just metadata.
  28. */
  29. # define QUANTUM_PAINTER_NUM_IMAGES 8
  30. #endif // QUANTUM_PAINTER_NUM_IMAGES
  31. #ifndef QUANTUM_PAINTER_NUM_FONTS
  32. /**
  33. * @def This controls the maximum number of fonts that Quantum Painter can load. Fonts can be loaded using
  34. * \ref qp_load_font_mem, and can be unloaded by calling \ref qp_close_font. Increasing this number in order to
  35. * load more fonts increases the amount of RAM required. Font data is not held in RAM, unless
  36. * \ref QUANTUM_PAINTER_LOAD_FONTS_TO_RAM is set to TRUE.
  37. */
  38. # define QUANTUM_PAINTER_NUM_FONTS 4
  39. #endif // QUANTUM_PAINTER_NUM_FONTS
  40. #ifndef QUANTUM_PAINTER_LOAD_FONTS_TO_RAM
  41. /**
  42. * @def This controls whether or not fonts should be cached in RAM. Under normal circumstances, fonts can have quite
  43. * random access patterns, and due to timing of flash memory or external storage, it may be a significant speedup
  44. * moving the font into RAM before use. Defaults to "off", but if it's enabled it will fallback to reading from the
  45. * original location if corresponding RAM could not be allocated (such as being too large).
  46. */
  47. # define QUANTUM_PAINTER_LOAD_FONTS_TO_RAM FALSE
  48. #endif
  49. #ifndef QUANTUM_PAINTER_CONCURRENT_ANIMATIONS
  50. /**
  51. * @def This controls the maximum number of animations that Quantum Painter can play simultaneously. Increasing this
  52. * number in order to play more animations at the same time increases the amount of RAM required.
  53. */
  54. # define QUANTUM_PAINTER_CONCURRENT_ANIMATIONS 4
  55. #endif // QUANTUM_PAINTER_CONCURRENT_ANIMATIONS
  56. #ifndef QUANTUM_PAINTER_PIXDATA_BUFFER_SIZE
  57. /**
  58. * @def This controls the maximum size of the pixel data buffer used for single blocks of transmission. Larger buffers
  59. * means more data is processed at one time, with less frequent transmissions, at the cost of RAM.
  60. */
  61. # define QUANTUM_PAINTER_PIXDATA_BUFFER_SIZE 1024
  62. #endif
  63. #ifndef QUANTUM_PAINTER_SUPPORTS_256_PALETTE
  64. /**
  65. * @def This controls whether 256-color palettes are supported. This has relatively hefty requirements on RAM -- at
  66. * least 1kB extra is required just to store the palette information, with more required for other metadata.
  67. */
  68. # define QUANTUM_PAINTER_SUPPORTS_256_PALETTE FALSE
  69. #endif
  70. #ifndef QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS
  71. /**
  72. * @def This controls whether the native color range is supported. This avoids the use of palettes but each image
  73. * requires more storage space.
  74. */
  75. # define QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS FALSE
  76. #endif
  77. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  78. // Quantum Painter types
  79. /**
  80. * @typedef A handle to a Quantum Painter device, such as an LCD or OLED. Most Quantum Painter APIs require this
  81. * argument in order to perform operations on the display.
  82. */
  83. typedef const void *painter_device_t;
  84. /**
  85. * @typedef The desired rotation of a panel. Used as a parameter to \ref qp_init, and can be queried by
  86. * \ref qp_get_geometry.
  87. */
  88. typedef enum { QP_ROTATION_0, QP_ROTATION_90, QP_ROTATION_180, QP_ROTATION_270 } painter_rotation_t;
  89. /**
  90. * @typedef A descriptor for a Quantum Painter image.
  91. */
  92. typedef struct painter_image_desc_t {
  93. uint16_t width; ///< Image width
  94. uint16_t height; ///< Image height
  95. uint16_t frame_count; ///< Number of frames in this image
  96. } painter_image_desc_t;
  97. /**
  98. * @typedef A handle to a Quantum Painter image.
  99. */
  100. typedef const painter_image_desc_t *painter_image_handle_t;
  101. /**
  102. * @typedef A descriptor for a Quantum Painter font.
  103. */
  104. typedef struct painter_font_desc_t {
  105. uint8_t line_height; ///< The number of pixels in height for each line
  106. } painter_font_desc_t;
  107. /**
  108. * @typedef A handle to a Quantum Painter font.
  109. */
  110. typedef const painter_font_desc_t *painter_font_handle_t;
  111. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  112. // Quantum Painter External API
  113. /**
  114. * Initialize a device and set its rotation.
  115. *
  116. * @param device[in] the handle of the device to initialize
  117. * @param rotation[in] the rotation to use
  118. * @return true if initialization succeeded
  119. * @return false if initialization failed
  120. */
  121. bool qp_init(painter_device_t device, painter_rotation_t rotation);
  122. /**
  123. * Controls whether a display is on or off.
  124. *
  125. * @note If backlighting is used to control brightness (such as for an LCD), it will need to be handled external to
  126. * Quantum Painter.
  127. *
  128. * @param device[in] the handle of the device to control
  129. * @param power_on[in] whether or not the device should be on
  130. * @return true if controlling the power state succeeded
  131. * @return false if controlling the power state failed
  132. */
  133. bool qp_power(painter_device_t device, bool power_on);
  134. /**
  135. * Clears a device's screen.
  136. *
  137. * @param device[in] the handle of the device to control
  138. * @return true if clearing the screen succeeded
  139. * @return false if clearing the screen failed
  140. */
  141. bool qp_clear(painter_device_t device);
  142. /**
  143. * Transmits any outstanding data to the screen in order to persist all changes to the display.
  144. *
  145. * @note Drivers without internal framebuffers will likely ignore this API.
  146. *
  147. * @param device[in] the handle of the device to control
  148. * @return true if flushing changes to the screen succeeded
  149. * @return false if flushing changes to the screen failed
  150. */
  151. bool qp_flush(painter_device_t device);
  152. /**
  153. * Retrieves the width of the display.
  154. *
  155. * @param device[in] the handle of the device to control
  156. */
  157. uint16_t qp_get_width(painter_device_t device);
  158. /**
  159. * Retrieves the height of the display.
  160. *
  161. * @param device[in] the handle of the device to control
  162. */
  163. uint16_t qp_get_height(painter_device_t device);
  164. /**
  165. * Retrieves the rotation of the display.
  166. *
  167. * @param device[in] the handle of the device to control
  168. */
  169. painter_rotation_t qp_get_rotation(painter_device_t device);
  170. /**
  171. * Retrieves the x-offset of the display.
  172. *
  173. * @param device[in] the handle of the device to control
  174. */
  175. uint16_t qp_get_offset_x(painter_device_t device);
  176. /**
  177. * Retrieves the y-offset of the display.
  178. *
  179. * @param device[in] the handle of the device to control
  180. */
  181. uint16_t qp_get_offset_y(painter_device_t device);
  182. /**
  183. * Retrieves the size, rotation, and offsets for the display.
  184. *
  185. * @note Any arguments of NULL will be ignored.
  186. *
  187. * @param device[in] the handle of the device to control
  188. * @param width[out] the device's width
  189. * @param height[out] the device's height
  190. * @param rotation[out] the device's rotation
  191. * @param offset_x[out] the device's x-offset applied while drawing
  192. * @param offset_y[out] the device's y-offset applied while drawing
  193. */
  194. void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height, painter_rotation_t *rotation, uint16_t *offset_x, uint16_t *offset_y);
  195. /**
  196. * Allows repositioning of the viewport if the panel geometry offsets are non-zero.
  197. *
  198. * @param device[in] the handle of the device to control
  199. * @param offset_x[in] the device's x-offset applied while drawing
  200. * @param offset_y[in] the device's y-offset applied while drawing
  201. */
  202. void qp_set_viewport_offsets(painter_device_t device, uint16_t offset_x, uint16_t offset_y);
  203. /**
  204. * Sets a pixel to the specified color.
  205. *
  206. * @param device[in] the handle of the device to control
  207. * @param x[in] the x-position to draw onto the device
  208. * @param y[in] the y-position to draw onto the device
  209. * @param hue[in] the hue to use, with 0-360 mapped to 0-255
  210. * @param sat[in] the saturation to use, with 0-100% mapped to 0-255
  211. * @param val[in] the value to use, with 0-100% mapped to 0-255
  212. * @return true if setting the pixel succeeded
  213. * @return false if setting the pixel failed
  214. */
  215. bool qp_setpixel(painter_device_t device, uint16_t x, uint16_t y, uint8_t hue, uint8_t sat, uint8_t val);
  216. /**
  217. * Draws a line using the specified color.
  218. *
  219. * @param device[in] the handle of the device to control
  220. * @param x0[in] the device's x-position to start
  221. * @param y0[in] the device's y-position to start
  222. * @param x1[in] the device's x-position to finish
  223. * @param y1[in] the device's y-position to finish
  224. * @param hue[in] the hue to use, with 0-360 mapped to 0-255
  225. * @param sat[in] the saturation to use, with 0-100% mapped to 0-255
  226. * @param val[in] the value to use, with 0-100% mapped to 0-255
  227. * @return true if drawing the line succeeded
  228. * @return false if drawing the line failed
  229. */
  230. bool qp_line(painter_device_t device, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t hue, uint8_t sat, uint8_t val);
  231. /**
  232. * Draws a rectangle using the specified color, optionally filled.
  233. *
  234. * @param device[in] the handle of the device to control
  235. * @param left[in] the device's x-position to start
  236. * @param top[in] the device's y-position to start
  237. * @param right[in] the device's x-position to finish
  238. * @param bottom[in] the device's y-position to finish
  239. * @param hue[in] the hue to use, with 0-360 mapped to 0-255
  240. * @param sat[in] the saturation to use, with 0-100% mapped to 0-255
  241. * @param val[in] the value to use, with 0-100% mapped to 0-255
  242. * @param filled[in] whether the rectangle should be filled
  243. * @return true if drawing the rectangle succeeded
  244. * @return false if drawing the rectangle failed
  245. */
  246. bool qp_rect(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint8_t hue, uint8_t sat, uint8_t val, bool filled);
  247. /**
  248. * Draws a circle using the specified color, optionally filled.
  249. *
  250. * @param device[in] the handle of the device to control
  251. * @param x[in] the x-position of the centre of the circle to draw onto the device
  252. * @param y[in] the y-position of the centre of the circle to draw onto the device
  253. * @param radius[in] the radius of the circle to draw
  254. * @param hue[in] the hue to use, with 0-360 mapped to 0-255
  255. * @param sat[in] the saturation to use, with 0-100% mapped to 0-255
  256. * @param val[in] the value to use, with 0-100% mapped to 0-255
  257. * @param filled[in] whether the circle should be filled
  258. * @return true if drawing the circle succeeded
  259. * @return false if drawing the circle failed
  260. */
  261. bool qp_circle(painter_device_t device, uint16_t x, uint16_t y, uint16_t radius, uint8_t hue, uint8_t sat, uint8_t val, bool filled);
  262. /**
  263. * Draws a ellipse using the specified color, optionally filled.
  264. *
  265. * @param device[in] the handle of the device to control
  266. * @param x[in] the x-position of the centre of the ellipse to draw onto the device
  267. * @param y[in] the y-position of the centre of the ellipse to draw onto the device
  268. * @param sizex[in] the horizontal size of the ellipse
  269. * @param sizey[in] the vertical size of the ellipse
  270. * @param hue[in] the hue to use, with 0-360 mapped to 0-255
  271. * @param sat[in] the saturation to use, with 0-100% mapped to 0-255
  272. * @param val[in] the value to use, with 0-100% mapped to 0-255
  273. * @param filled[in] whether the ellipse should be filled
  274. * @return true if drawing the ellipse succeeded
  275. * @return false if drawing the ellipse failed
  276. */
  277. bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex, uint16_t sizey, uint8_t hue, uint8_t sat, uint8_t val, bool filled);
  278. /**
  279. * Sets up the location on the display to stream raw pixel data to the display, using \ref qp_pixdata.
  280. *
  281. * @note This is for advanced uses only, and should not be required for normal Quantum Painter functionality.
  282. *
  283. * @param device[in] the handle of the device to control
  284. * @param left[in] the device's x-position to start
  285. * @param top[in] the device's y-position to start
  286. * @param right[in] the device's x-position to finish
  287. * @param bottom[in] the device's y-position to finish
  288. * @return true if setting the viewport succeeded
  289. * @return false if setting the viewport failed
  290. */
  291. bool qp_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom);
  292. /**
  293. * Streams raw pixel data (in the native panel format) to the area previously set by \ref qp_viewport.
  294. *
  295. * @note This is for advanced uses only, and should not be required for normal Quantum Painter functionality.
  296. *
  297. * @param device[in] the handle of the device to control
  298. * @param pixel_data[in] pointer to buffer data
  299. * @param native_pixel_count[in] the number of pixels to transmit
  300. * @return true if streaming of data succeeded
  301. * @return false if streaming of data failed
  302. */
  303. bool qp_pixdata(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count);
  304. /**
  305. * Loads an image into memory.
  306. *
  307. * @note Images can be unloaded by calling \ref qp_close_image.
  308. *
  309. * @param buffer[in] the image data to load
  310. * @return an image handle usable with \ref qp_drawimage, \ref qp_drawimage_recolor, \ref qp_animate, and
  311. * \ref qp_animate_recolor.
  312. * @return NULL if loading the image failed
  313. */
  314. painter_image_handle_t qp_load_image_mem(const void *buffer);
  315. /**
  316. * Closes an image handle when no longer in use.
  317. *
  318. * @param image[in] the handle of the image to unload
  319. * @return true if unloading the image succeeded
  320. * @return false if unloading the image failed
  321. */
  322. bool qp_close_image(painter_image_handle_t image);
  323. /**
  324. * Draws an image to the display.
  325. *
  326. * @param device[in] the handle of the device to control
  327. * @param x[in] the x-position where the image should be drawn onto the device
  328. * @param y[in] the y-position where the image should be drawn onto the device
  329. * @param image[in] the handle of the image to draw
  330. * @return true if drawing the image succeeded
  331. * @return false if drawing the image failed
  332. */
  333. bool qp_drawimage(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image);
  334. /**
  335. * Draws an image to the display, recoloring monochrome images to the desired foreground/background.
  336. *
  337. * @param device[in] the handle of the device to control
  338. * @param x[in] the x-position where the image should be drawn onto the device
  339. * @param y[in] the y-position where the image should be drawn onto the device
  340. * @param image[in] the handle of the image to draw
  341. * @param hue_fg[in] the foreground hue to use, with 0-360 mapped to 0-255
  342. * @param sat_fg[in] the foreground saturation to use, with 0-100% mapped to 0-255
  343. * @param val_fg[in] the foreground value to use, with 0-100% mapped to 0-255
  344. * @param hue_bg[in] the background hue to use, with 0-360 mapped to 0-255
  345. * @param sat_bg[in] the background saturation to use, with 0-100% mapped to 0-255
  346. * @param val_bg[in] the background value to use, with 0-100% mapped to 0-255
  347. * @return true if drawing the image succeeded
  348. * @return false if drawing the image failed
  349. */
  350. bool qp_drawimage_recolor(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image, uint8_t hue_fg, uint8_t sat_fg, uint8_t val_fg, uint8_t hue_bg, uint8_t sat_bg, uint8_t val_bg);
  351. /**
  352. * Draws an animation to the display.
  353. *
  354. * @param device[in] the handle of the device to control
  355. * @param x[in] the x-position where the image should be drawn onto the device
  356. * @param y[in] the y-position where the image should be drawn onto the device
  357. * @param image[in] the handle of the image to draw
  358. * @return the \ref deferred_token to use with \ref qp_stop_animation in order to stop animating
  359. * @return INVALID_DEFERRED_TOKEN if animating the image failed
  360. */
  361. deferred_token qp_animate(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image);
  362. /**
  363. * Draws an animation to the display, recoloring monochrome images to the desired foreground/background.
  364. *
  365. * @param device[in] the handle of the device to control
  366. * @param x[in] the x-position where the image should be drawn onto the device
  367. * @param y[in] the y-position where the image should be drawn onto the device
  368. * @param image[in] the handle of the image to draw
  369. * @param hue_fg[in] the foreground hue to use, with 0-360 mapped to 0-255
  370. * @param sat_fg[in] the foreground saturation to use, with 0-100% mapped to 0-255
  371. * @param val_fg[in] the foreground value to use, with 0-100% mapped to 0-255
  372. * @param hue_bg[in] the background hue to use, with 0-360 mapped to 0-255
  373. * @param sat_bg[in] the background saturation to use, with 0-100% mapped to 0-255
  374. * @param val_bg[in] the background value to use, with 0-100% mapped to 0-255
  375. * @return the \ref deferred_token to use with \ref qp_stop_animation in order to stop animating
  376. * @return INVALID_DEFERRED_TOKEN if animating the image failed
  377. */
  378. deferred_token qp_animate_recolor(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image, uint8_t hue_fg, uint8_t sat_fg, uint8_t val_fg, uint8_t hue_bg, uint8_t sat_bg, uint8_t val_bg);
  379. /**
  380. * Cancels a running animation.
  381. *
  382. * @param anim_token[in] the animation token returned by \ref qp_animate, or \ref qp_animate_recolor.
  383. */
  384. void qp_stop_animation(deferred_token anim_token);
  385. /**
  386. * Loads a font into memory.
  387. *
  388. * @note Fonts can be unloaded by calling \ref qp_close_font.
  389. *
  390. * @param buffer[in] the font data to load
  391. * @return an image handle usable with \ref qp_textwidth, \ref qp_drawtext, and \ref qp_drawtext_recolor.
  392. * @return NULL if loading the font failed
  393. */
  394. painter_font_handle_t qp_load_font_mem(const void *buffer);
  395. /**
  396. * Closes a font handle when no longer in use.
  397. *
  398. * @param font[in] the handle of the font to unload
  399. * @return true if unloading the font succeeded
  400. * @return false if unloading the font failed
  401. */
  402. bool qp_close_font(painter_font_handle_t font);
  403. /**
  404. * Measures the width (in pixels) of the supplied string, given the specified font.
  405. *
  406. * @param font[in] the handle of the font
  407. * @param str[in] the string to measure
  408. * @return the width (in pixels) needed to draw the specified string
  409. */
  410. int16_t qp_textwidth(painter_font_handle_t font, const char *str);
  411. /**
  412. * Draws text to the display.
  413. *
  414. * @param device[in] the handle of the device to control
  415. * @param x[in] the x-position where the text should be drawn onto the device
  416. * @param y[in] the y-position where the text should be drawn onto the device
  417. * @param font[in] the handle of the font
  418. * @param str[in] the string to draw
  419. * @return the width (in pixels) used when drawing the specified string
  420. */
  421. int16_t qp_drawtext(painter_device_t device, uint16_t x, uint16_t y, painter_font_handle_t font, const char *str);
  422. /**
  423. * Draws text to the display, recoloring monochrome fonts to the desired foreground/background.
  424. *
  425. * @param device[in] the handle of the device to control
  426. * @param x[in] the x-position where the text should be drawn onto the device
  427. * @param y[in] the y-position where the text should be drawn onto the device
  428. * @param font[in] the handle of the font
  429. * @param str[in] the string to draw
  430. * @param hue_fg[in] the foreground hue to use, with 0-360 mapped to 0-255
  431. * @param sat_fg[in] the foreground saturation to use, with 0-100% mapped to 0-255
  432. * @param val_fg[in] the foreground value to use, with 0-100% mapped to 0-255
  433. * @param hue_bg[in] the background hue to use, with 0-360 mapped to 0-255
  434. * @param sat_bg[in] the background saturation to use, with 0-100% mapped to 0-255
  435. * @param val_bg[in] the background value to use, with 0-100% mapped to 0-255
  436. * @return the width (in pixels) used when drawing the specified string
  437. */
  438. int16_t qp_drawtext_recolor(painter_device_t device, uint16_t x, uint16_t y, painter_font_handle_t font, const char *str, uint8_t hue_fg, uint8_t sat_fg, uint8_t val_fg, uint8_t hue_bg, uint8_t sat_bg, uint8_t val_bg);
  439. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  440. // Quantum Painter Drivers
  441. #ifdef QUANTUM_PAINTER_RGB565_SURFACE_ENABLE
  442. # include "qp_rgb565_surface.h"
  443. #else // QUANTUM_PAINTER_RGB565_SURFACE_ENABLE
  444. # define RGB565_SURFACE_NUM_DEVICES 0
  445. #endif // QUANTUM_PAINTER_RGB565_SURFACE_ENABLE
  446. #ifdef QUANTUM_PAINTER_ILI9163_ENABLE
  447. # include "qp_ili9163.h"
  448. #else // QUANTUM_PAINTER_ILI9163_ENABLE
  449. # define ILI9163_NUM_DEVICES 0
  450. #endif // QUANTUM_PAINTER_ILI9163_ENABLE
  451. #ifdef QUANTUM_PAINTER_ILI9341_ENABLE
  452. # include "qp_ili9341.h"
  453. #else // QUANTUM_PAINTER_ILI9341_ENABLE
  454. # define ILI9341_NUM_DEVICES 0
  455. #endif // QUANTUM_PAINTER_ILI9341_ENABLE
  456. #ifdef QUANTUM_PAINTER_ILI9486_ENABLE
  457. # include "qp_ili9486.h"
  458. #else // QUANTUM_PAINTER_ILI9486_ENABLE
  459. # define ILI9486_NUM_DEVICES 0
  460. #endif // QUANTUM_PAINTER_ILI9486_ENABLE
  461. #ifdef QUANTUM_PAINTER_ILI9488_ENABLE
  462. # include "qp_ili9488.h"
  463. #else // QUANTUM_PAINTER_ILI9488_ENABLE
  464. # define ILI9488_NUM_DEVICES 0
  465. #endif // QUANTUM_PAINTER_ILI9488_ENABLE
  466. #ifdef QUANTUM_PAINTER_ST7789_ENABLE
  467. # include "qp_st7789.h"
  468. #else // QUANTUM_PAINTER_ST7789_ENABLE
  469. # define ST7789_NUM_DEVICES 0
  470. #endif // QUANTUM_PAINTER_ST7789_ENABLE
  471. #ifdef QUANTUM_PAINTER_ST7735_ENABLE
  472. # include "qp_st7735.h"
  473. #else // QUANTUM_PAINTER_ST7735_ENABLE
  474. # define ST7735_NUM_DEVICES 0
  475. #endif // QUANTUM_PAINTER_ST7735_ENABLE
  476. #ifdef QUANTUM_PAINTER_GC9A01_ENABLE
  477. # include "qp_gc9a01.h"
  478. #else // QUANTUM_PAINTER_GC9A01_ENABLE
  479. # define GC9A01_NUM_DEVICES 0
  480. #endif // QUANTUM_PAINTER_GC9A01_ENABLE
  481. #ifdef QUANTUM_PAINTER_GC9107_ENABLE
  482. # include "qp_gc9107.h"
  483. #else // QUANTUM_PAINTER_GC9107_ENABLE
  484. # define GC9107_NUM_DEVICES 0
  485. #endif // QUANTUM_PAINTER_GC9107_ENABLE
  486. #ifdef QUANTUM_PAINTER_SSD1351_ENABLE
  487. # include "qp_ssd1351.h"
  488. #else // QUANTUM_PAINTER_SSD1351_ENABLE
  489. # define SSD1351_NUM_DEVICES 0
  490. #endif // QUANTUM_PAINTER_SSD1351_ENABLE
  491. #ifdef QUANTUM_PAINTER_SH1106_ENABLE
  492. # include "qp_sh1106.h"
  493. #else // QUANTUM_PAINTER_SH1106_ENABLE
  494. # define SH1106_NUM_DEVICES 0
  495. #endif // QUANTUM_PAINTER_SH1106_ENABLE
  496. #ifdef QUANTUM_PAINTER_SH1107_ENABLE
  497. # include "qp_sh1107.h"
  498. #else // QUANTUM_PAINTER_SH1107_ENABLE
  499. # define SH1107_NUM_DEVICES 0
  500. #endif // QUANTUM_PAINTER_SH1107_ENABLE
  501. #ifdef QUANTUM_PAINTER_LD7032_ENABLE
  502. # include "qp_ld7032.h"
  503. #else // QUANTUM_PAINTER_LD7032_ENABLE
  504. # define LD7032_NUM_DEVICES 0
  505. #endif // QUANTUM_PAINTER_LD7032_ENABLE
  506. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  507. // Quantum Painter Extras
  508. #ifdef QUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE
  509. # include "qp_lvgl.h"
  510. #endif // QUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE