diff options
| author | Nick Brassel <nick@tzarc.org> | 2024-05-30 12:00:41 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-30 12:00:41 +1000 |
| commit | 6ef97172889ccd5db376b2a9f8825489e24fdac4 (patch) | |
| tree | 334e3bf41c8554d4bee73a140822f95f60eb64e9 /docs/quantum_painter_lvgl.md | |
| parent | 395766657ff98a4b1fd0dcba5917557f8acbb9e4 (diff) | |
Vitepress conversion of docs. (#23795)
Diffstat (limited to 'docs/quantum_painter_lvgl.md')
| -rw-r--r-- | docs/quantum_painter_lvgl.md | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/docs/quantum_painter_lvgl.md b/docs/quantum_painter_lvgl.md index b4f31ad4af..40b3c3b2f1 100644 --- a/docs/quantum_painter_lvgl.md +++ b/docs/quantum_painter_lvgl.md | |||
| @@ -1,14 +1,16 @@ | |||
| 1 | # Quantum Painter LVGL Integration :id=lvgl | 1 | # Quantum Painter LVGL Integration {#lvgl} |
| 2 | 2 | ||
| 3 | LVGL (Light and Versatile Graphics Library) is an open-source graphics library providing everything you need to create an embedded GUI for your board with easy-to-use graphical elements. | 3 | LVGL (Light and Versatile Graphics Library) is an open-source graphics library providing everything you need to create an embedded GUI for your board with easy-to-use graphical elements. |
| 4 | 4 | ||
| 5 | LVGL integrates with [Quantum Painter's](quantum_painter.md) API and drivers to render to the display, the hardware supported by Quantum Painter is also supported by LVGL. | 5 | LVGL integrates with [Quantum Painter's](quantum_painter) API and drivers to render to the display, the hardware supported by Quantum Painter is also supported by LVGL. |
| 6 | 6 | ||
| 7 | ?> Keep in mind that enabling the LVGL integration has a big impact in firmware size, it is recommeded to use a supported MCU with >256 kB of flash space. | 7 | ::: tip |
| 8 | Keep in mind that enabling the LVGL integration has a big impact in firmware size, it is recommeded to use a supported MCU with >256 kB of flash space. | ||
| 9 | ::: | ||
| 8 | 10 | ||
| 9 | To learn more about LVGL and how to use it please take a look at their [official documentation](https://docs.lvgl.io/8.2/intro/) | 11 | To learn more about LVGL and how to use it please take a look at their [official documentation](https://docs.lvgl.io/8.2/intro/) |
| 10 | 12 | ||
| 11 | ## Enabling LVGL :id=lvgl-enabling | 13 | ## Enabling LVGL {#lvgl-enabling} |
| 12 | To enable LVGL to be built into your firmware, add the following to `rules.mk`: | 14 | To enable LVGL to be built into your firmware, add the following to `rules.mk`: |
| 13 | 15 | ||
| 14 | ```make | 16 | ```make |
| @@ -16,11 +18,11 @@ QUANTUM_PAINTER_ENABLE = yes | |||
| 16 | QUANTUM_PAINTER_DRIVERS = ...... | 18 | QUANTUM_PAINTER_DRIVERS = ...... |
| 17 | QUANTUM_PAINTER_LVGL_INTEGRATION = yes | 19 | QUANTUM_PAINTER_LVGL_INTEGRATION = yes |
| 18 | ``` | 20 | ``` |
| 19 | To configure the Quantum Painter Display Drivers please read the [Quantum Painter Display Drivers](quantum_painter.md#quantum-painter-drivers) section. | 21 | To configure the Quantum Painter Display Drivers please read the [Quantum Painter Display Drivers](quantum_painter#quantum-painter-drivers) section. |
| 20 | 22 | ||
| 21 | ## Quantum Painter LVGL API :id=lvgl-api | 23 | ## Quantum Painter LVGL API {#lvgl-api} |
| 22 | 24 | ||
| 23 | ### Quantum Painter LVGL Attach :id=lvgl-api-init | 25 | ### Quantum Painter LVGL Attach {#lvgl-api-init} |
| 24 | 26 | ||
| 25 | ```c | 27 | ```c |
| 26 | bool qp_lvgl_attach(painter_device_t device); | 28 | bool qp_lvgl_attach(painter_device_t device); |
| @@ -39,10 +41,13 @@ void keyboard_post_init_kb(void) { | |||
| 39 | } | 41 | } |
| 40 | } | 42 | } |
| 41 | ``` | 43 | ``` |
| 42 | To init. the display please read the [Display Initialisation](quantum_painter.md#quantum-painter-api-init) section. | 44 | To init. the display please read the [Display Initialisation](quantum_painter#quantum-painter-api-init) section. |
| 43 | 45 | ||
| 44 | !> Attaching LVGL to a display means LVGL subsequently "owns" the display. Using standard Quantum Painter drawing operations with the display after LVGL attachment will likely result in display artifacts. | 46 | ::: warning |
| 45 | ### Quantum Painter LVGL Detach :id=lvgl-api-init | 47 | Attaching LVGL to a display means LVGL subsequently "owns" the display. Using standard Quantum Painter drawing operations with the display after LVGL attachment will likely result in display artifacts. |
| 48 | ::: | ||
| 49 | |||
| 50 | ### Quantum Painter LVGL Detach {#lvgl-api-detach} | ||
| 46 | 51 | ||
| 47 | ```c | 52 | ```c |
| 48 | void qp_lvgl_detach(void) | 53 | void qp_lvgl_detach(void) |
| @@ -50,7 +55,7 @@ void qp_lvgl_detach(void) | |||
| 50 | 55 | ||
| 51 | The `qp_lvgl_detach` function stops the internal LVGL ticks and releases resources related to it. | 56 | The `qp_lvgl_detach` function stops the internal LVGL ticks and releases resources related to it. |
| 52 | 57 | ||
| 53 | ## Enabling/Disabling LVGL features :id=lvgl-configuring | 58 | ## Enabling/Disabling LVGL features {#lvgl-configuring} |
| 54 | 59 | ||
| 55 | You can overwrite LVGL specific features in your `lv_conf.h` file. | 60 | You can overwrite LVGL specific features in your `lv_conf.h` file. |
| 56 | 61 | ||
