feat(drivers): Renesas GLCDC display dirver
This commit is contained in:
committed by
Gabor Kiss-Vamosi
parent
5ed3a064c1
commit
4d12d64e4e
@@ -1,3 +1,5 @@
|
||||
.. _renesas:
|
||||
|
||||
=======
|
||||
Renesas
|
||||
=======
|
||||
@@ -19,6 +21,14 @@ Dave2D is capable of accelerating most of the drawing operations of LVGL:
|
||||
|
||||
As Dave2D works in the background, the CPU is free for other tasks. In practice, during rendering, Dave2D can reduce the CPU usage by half or to one-third, depending on the application.
|
||||
|
||||
GLCDC
|
||||
-----
|
||||
|
||||
GLCDC is a multi-stage graphics output peripheral available in several Renesas MCUs.
|
||||
It is able to drive LCD panles via a higly configurable RGB interface.
|
||||
|
||||
More info can be found at the :ref:`dirver's page<renesas_glcdc>`.
|
||||
|
||||
Certified boards
|
||||
----------------
|
||||
|
||||
@@ -35,6 +45,8 @@ The official IDE of Renesas is called `e² studio <https://www.renesas.com/us/en
|
||||
|
||||
To get started, just download and install e² studio.
|
||||
|
||||
JLink is used for debugging, it can be downloaded [here](https://www.segger.com/downloads/jlink/)
|
||||
|
||||
Getting started with LVGL
|
||||
-------------------------
|
||||
|
||||
@@ -46,12 +58,35 @@ LVGL provides a ready-to-use project for the `EK-RA8D1 <https://www.renesas.com/
|
||||
- 4.5 Inch backlit TFT display, 16.7M display colors
|
||||
- 480x854 pixels resolution
|
||||
|
||||
To get a ready-to-use project, clone the `lv_renesas <https://github.com/lvgl/lv_renesas.git>`__ repository:
|
||||
**Setting up the project**
|
||||
|
||||
.. code:: shell
|
||||
git clone https://github.com/lvgl/lv_renesas.git --recurse-submodules
|
||||
- First, clone the ready-to-use `lv_port_renesas_ek-ra8d1 <https://github.com/lvgl/lv_port_renesas_ek-ra8d1.git>`__ repository:
|
||||
|
||||
After that, *Import* ``lv_ek_ra8d1`` into e² studio, build the project, and flash it.
|
||||
.. code-block:: shell
|
||||
|
||||
git clone https://github.com/lvgl/lv_port_renesas_ek-ra8d1.git --recurse-submodules
|
||||
|
||||
- Open e² studio, go to ``File`` -> ``Import project`` and select ``General`` / ``Exsisting projects into workspace``
|
||||
|
||||
.. image:: /misc/renesas/import.png
|
||||
:alt: Importing the project
|
||||
|
||||
|
||||
- Browse the cloned folder and press ``Finish``
|
||||
|
||||
- Double click on ``configuration.xml``. This will activate the configuration window.
|
||||
|
||||
Renesas' Flexible Software Package (FSP) incudes BSP and HAL layer support extended with multiple RTOS variants and other middleware stacks.
|
||||
The components will be available via code generation, incuding the entry point of *"main.c"*.
|
||||
|
||||
Press ``Generate Project Content`` in the top right corner.
|
||||
|
||||
.. image:: /misc/renesas/generate.png
|
||||
:alt: Code generation with FSP
|
||||
|
||||
- Build the project by pressing ``Ctrl`` + ``Alt`` + ``B``
|
||||
|
||||
- Click the Debug button. When prompted select the `J-Link ARM` Debugger and the `R7FA8D1BH` MCU.
|
||||
|
||||
Note that on the ``SW1`` DIP switch (middle of the board) 7 should be ON, all others are OFF.
|
||||
|
||||
@@ -61,7 +96,7 @@ Modify the project
|
||||
Open a demo
|
||||
~~~~~~~~~~~
|
||||
|
||||
In `LVGL_thread_entry <https://github.com/lvgl/lv_renesas/blob/master/lv_ek_ra8d1/src/LVGL_thread_entry.c>`__, the demos are automatically enabled based on the settings in `lv_conf.h <https://github.com/lvgl/lv_renesas/blob/master/lv_ek_ra8d1/src/lv_conf.h>`__.
|
||||
In `LVGL_thread_entry <https://github.com/lvgl/lv_port_renesas_ek-ra8d1/blob/master/src/LVGL_thread_entry.c>`__, the demos are automatically enabled based on the settings in `lv_conf.h <https://github.com/lvgl/lv_port_renesas_ek-ra8d1/blob/master/src/lv_conf.h>`__.
|
||||
|
||||
You can disable all demos (or just comment them out) and call some ``lv_example_...()`` functions, or add your custom code.
|
||||
|
||||
@@ -81,4 +116,4 @@ Configuration
|
||||
Support
|
||||
-------
|
||||
|
||||
In case of an problems or questions open an issue in the `lv_renesas <https://github.com/lvgl/lv_renesas/issues>`__ repository.
|
||||
In case of an problems or questions open an issue in the `lv_port_renesas_ek-ra8d1 <https://github.com/lvgl/lv_port_renesas_ek-ra8d1/issues>`__ repository.
|
||||
|
||||
@@ -12,3 +12,4 @@ Display
|
||||
st7735
|
||||
st7789
|
||||
st7796
|
||||
renesas_glcdc
|
||||
|
||||
58
docs/integration/driver/display/renesas_glcdc.rst
Normal file
58
docs/integration/driver/display/renesas_glcdc.rst
Normal file
@@ -0,0 +1,58 @@
|
||||
.. _renesas_glcdc:
|
||||
|
||||
=============
|
||||
Renesas GLCDC
|
||||
=============
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
.. image:: /misc/renesas/glcdc.png
|
||||
:alt: Architectural overview of Renesas GLCDC
|
||||
:align: center
|
||||
|
||||
|
|
||||
|
||||
GLCDC is a multi-stage graphics output peripheral used in Renesas MCUs.
|
||||
It is designed to automatically generate timing and data signals for different LCD panels.
|
||||
|
||||
- Supports LCD panels with RGB interface (up to 24 bits) and sync signals (HSYNC, VSYNC and Data Enable optional)
|
||||
- Supports various color formats for input graphics planes (RGB888, ARGB8888, RGB565, ARGB1555, ARGB4444, CLUT8, CLUT4, CLUT1)
|
||||
- Supports the Color Look-Up Table (CLUT) usage for input graphics planes (ARGB8888) with 512 words (32 bits/word)
|
||||
- Supports various color formats for output (RGB888, RGB666, RGB565, Serial RGB888)
|
||||
- Can input two graphics planes on top of the background plane and blend them on the screen
|
||||
- Generates a dot clock to the panel. The clock source is selectable from internal or external (LCD_EXTCLK)
|
||||
- Supports brightness adjustment, contrast adjustment, and gamma correction
|
||||
- Supports GLCDC interrupts to handle frame-buffer switching or underflow detection
|
||||
|
||||
| Setting up a project and further integration with Renesas' ecosystem is described in detail on :ref:`page Renesas <renesas>`.
|
||||
| Check out the `EK-RA8D1 example repository <https://github.com/lvgl/lv_port_renesas_ek-ra8d1>`__ for a ready-to-use example.
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- This diver relies on FSP generated code. Missing the step while setting up the project will cause a compilation error.
|
||||
- Activate the diver by setting :c:macro:`LV_USE_DRAW_PXP` to ``1`` in your *"lv_conf.h"*.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
There is no need to implement any platform-specific functions.
|
||||
|
||||
The following code demonstrates using the diver in :cpp:enumerator:`LV_DISPLAY_RENDER_MODE_DIRECT` mode.
|
||||
|
||||
.. code:: c
|
||||
|
||||
lv_display_t * disp = lv_renesas_glcdc_direct_create();
|
||||
lv_display_set_default(disp);
|
||||
|
||||
To use the driver in :cpp:enumerator:`LV_DISPLAY_RENDER_MODE_PARTIAL` mode, an extra buffer must be allocated,
|
||||
desireably in the fastest available memory region.
|
||||
Buffer swapping can be activated by passing a second buffer of same size insted of the :cpp:expr:`NULL` argument.
|
||||
|
||||
.. code:: c
|
||||
|
||||
static lv_color_t partial_draw_buf[DISPLAY_HSIZE_INPUT0 * DISPLAY_VSIZE_INPUT0 / 10] BSP_PLACE_IN_SECTION(".sdram") BSP_ALIGN_VARIABLE(1024);
|
||||
|
||||
lv_display_t * disp = lv_renesas_glcdc_partial_create(partial_draw_buf, NULL, sizeof(partial_draw_buf));
|
||||
lv_display_set_default(disp);
|
||||
BIN
docs/misc/renesas/generate.png
Normal file
BIN
docs/misc/renesas/generate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
BIN
docs/misc/renesas/glcdc.png
Normal file
BIN
docs/misc/renesas/glcdc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
BIN
docs/misc/renesas/import.png
Normal file
BIN
docs/misc/renesas/import.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
Reference in New Issue
Block a user