From 1480e0470e60f072ce2416b769adc389e0df828b Mon Sep 17 00:00:00 2001 From: faxe1008 Date: Wed, 23 Aug 2023 14:42:24 +0200 Subject: [PATCH] docs(indev): add explanation for LV_INDEV_TYPE_BUTTON (#4478) --- docs/porting/indev.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/porting/indev.rst b/docs/porting/indev.rst index 4699158d5..e66b1be2a 100644 --- a/docs/porting/indev.rst +++ b/docs/porting/indev.rst @@ -181,9 +181,12 @@ should look like ``const lv_point_t points_array[] = { {12,30},{60,90}, ...}`` data->state = LV_INDEV_STATE_RELEASED; /*Set the released state*/ } - data->btn = last_btn; /*Save the last button*/ + data->btn_id = last_btn; /*Save the last button*/ } +When the ``button_read`` callback in the example above changes the ``data->btn_id`` to ``0`` +a press/release action at the first index of the ``points_array`` will be performed (``{12,30}``). + Other features **************