fix: eliminate misc sphinx warnings... (#6929)
This commit is contained in:
@@ -20,7 +20,7 @@ flush_cb
|
||||
|
||||
An example ``flush_cb`` looks like this:
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
void my_flush_cb(lv_display_t * display, const lv_area_t * area, uint8_t * px_map)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ The draw buffers can be set with
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
static uint16_t buf[LCD_HOR_RES * LCD_VER_RES / 10];
|
||||
lv_display_set_buffers(disp, buf, NULL, sizeof(buf), LV_DISPLAY_RENDER_MODE_PARTIAL);
|
||||
@@ -172,10 +172,10 @@ The default color format of the display is set according to :c:macro:`LV_COLOR_D
|
||||
- :c:macro:`LV_COLOR_DEPTH` ``24``: RGB888 (3 bytes/pixel)
|
||||
- :c:macro:`LV_COLOR_DEPTH` ``16``: RGB565 (2 bytes/pixel)
|
||||
- :c:macro:`LV_COLOR_DEPTH` ``8``: L8 (1 bytes/pixel)
|
||||
- :c:macro:`LV_COLOR_DEPTH` ``1``: I1 (1 bit/pixel) Only support for horizontal mapped buffers. See :refr:`monochrome` for more details:
|
||||
- :c:macro:`LV_COLOR_DEPTH` ``1``: I1 (1 bit/pixel) Only support for horizontal mapped buffers. See :ref:`monochrome` for more details:
|
||||
|
||||
The ``color_format`` can be changed with
|
||||
:cpp:expr:`lv_display_set_color_depth(display, LV_COLOR_FORMAT_...)`.
|
||||
``lv_display_set_color_depth(display, LV_COLOR_FORMAT_...)`` .
|
||||
Besides the default value :c:macro:`LV_COLOR_FORMAT_ARGB8888` can be
|
||||
used as a well.
|
||||
|
||||
@@ -183,8 +183,8 @@ It's very important that draw buffer(s) should be large enough for any
|
||||
selected color format.
|
||||
|
||||
|
||||
Swap endianness
|
||||
--------------
|
||||
Swap Endianness
|
||||
---------------
|
||||
|
||||
In case of RGB565 color format it might be required to swap the 2 bytes
|
||||
because the SPI, I2C or 8 bit parallel port periphery sends them in the wrong order.
|
||||
@@ -256,7 +256,7 @@ the TE signal.
|
||||
|
||||
You can do this in the following way:
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
/*Delete the original display refresh timer*/
|
||||
lv_display_delete_refr_timer(disp);
|
||||
@@ -279,7 +279,7 @@ Force refreshing
|
||||
----------------
|
||||
|
||||
Normally the invalidated areas (marked for redraw) are rendered in :cpp:func:`lv_timer_handler` in every
|
||||
:c:macro:`LV_DEF_REFR_PERIOD` milliseconds. However, by using :cpp:func:`lv_refr_now(display)` you can ask LVGL to
|
||||
:c:macro:`LV_DEF_REFR_PERIOD` milliseconds. However, by using :cpp:expr:`lv_refr_now(display)` you can ask LVGL to
|
||||
redraw the invalid areas immediately. The refreshing will happen in :cpp:func:`lv_refr_now` which might take
|
||||
longer time.
|
||||
|
||||
@@ -313,8 +313,7 @@ Further reading
|
||||
|
||||
- `lv_port_disp_template.c <https://github.com/lvgl/lvgl/blob/master/examples/porting/lv_port_disp_template.c>`__
|
||||
for a template for your own driver.
|
||||
- :ref:`Drawing <drawing>` to learn more about how rendering
|
||||
works in LVGL.
|
||||
- :ref:`Drawing <porting_draw>` to learn more about how rendering works in LVGL.
|
||||
- :ref:`display_features` to learn more about higher
|
||||
level display features.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Types of input devices
|
||||
|
||||
To create an input device use
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
/*Register at least one display before you register any input devices*/
|
||||
lv_indev_t * indev = lv_indev_create();
|
||||
@@ -35,7 +35,7 @@ Touchpad, mouse or any pointer
|
||||
Input devices that can click points on the screen belong to this
|
||||
category.
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER);
|
||||
...
|
||||
@@ -68,10 +68,10 @@ the last clicked widget will be either scrolled or it's value will be incremente
|
||||
|
||||
As this behavior is tightly related to the last clicked widget, the crown support is
|
||||
an extension of the pointer input device. Just set ``data->diff`` to the number of
|
||||
turned steps and LVGL will automatically send :cpp:enum:`LV_EVENT_ROTARY` or scroll the widget based on the
|
||||
turned steps and LVGL will automatically send :cpp:enumerator:`LV_EVENT_ROTARY` or scroll the widget based on the
|
||||
``editable`` flag in the widget's class. Non-editable widgets are scrolled and for editable widgets the event is sent.
|
||||
|
||||
To get the steps in an event callback use :cpp:func:`int32_t diff = lv_event_get_rotary_diff(e)`
|
||||
To get the steps in an event callback use :cpp:func:`lv_event_get_rotary_diff`
|
||||
|
||||
The rotary sensitivity can be adjusted on 2 levels:
|
||||
|
||||
@@ -101,7 +101,7 @@ To use a keyboard/keypad:
|
||||
- Use ``LV_KEY_...`` to navigate among the objects in the group. See
|
||||
``lv_core/lv_group.h`` for the available keys.
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
|
||||
lv_indev_set_type(indev, LV_INDEV_TYPE_KEYPAD);
|
||||
@@ -137,7 +137,7 @@ In short, the Encoder input devices work like this:
|
||||
To use an *Encoder* (similarly to the *Keypads*) the objects should be
|
||||
added to groups.
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
lv_indev_set_type(indev, LV_INDEV_TYPE_ENCODER);
|
||||
|
||||
@@ -150,8 +150,8 @@ added to groups.
|
||||
else data->state = LV_INDEV_STATE_RELEASED;
|
||||
}
|
||||
|
||||
Using buttons with Encoder logic
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Using Buttons with Encoder Logic
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In addition to standard encoder behavior, you can also utilize its logic
|
||||
to navigate(focus) and edit widgets using buttons. This is especially
|
||||
@@ -168,7 +168,7 @@ You need to have 3 buttons available:
|
||||
If you hold the keys it will simulate an encoder advance with period
|
||||
specified in ``indev_drv.long_press_repeat_time``.
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
|
||||
lv_indev_set_type(indev, LV_INDEV_TYPE_ENCODER);
|
||||
@@ -199,7 +199,7 @@ should look like ``const lv_point_t points_array[] = { {12,30},{60,90}, ...}``
|
||||
:important: The points_array can't go out of scope. Either declare it as a global variable
|
||||
or as a static variable inside a function.`
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
|
||||
lv_indev_set_type(indev, LV_INDEV_TYPE_BUTTON);
|
||||
@@ -279,7 +279,7 @@ might need to read it by polling file descriptor (fd).
|
||||
|
||||
You can do this in the following way:
|
||||
|
||||
.. code:: c
|
||||
.. code-block:: c
|
||||
|
||||
/*Update the input device's running mode to LV_INDEV_MODE_EVENT*/
|
||||
lv_indev_set_mode(indev, LV_INDEV_MODE_EVENT);
|
||||
|
||||
Reference in New Issue
Block a user