Skip to content

Commit

Permalink
docs(porting) clarify that displays must be registered before input d…
Browse files Browse the repository at this point in the history
…evices

Related: #2844 (thanks @SgtPepperFTW)
  • Loading branch information
embeddedt authored Nov 29, 2021
1 parent 5433e0b commit 1c64b78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/porting/indev.md
Original file line number Diff line number Diff line change
@@ -6,9 +6,11 @@

## Types of input devices

To register an input device an `lv_indev_drv_t` variable has to be initialized:
To register an input device an `lv_indev_drv_t` variable has to be initialized. **Be sure to register at least one display before you register any input devices.**

```c
lv_disp_drv_register(&disp_drv);

static lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv); /*Basic initialization*/
indev_drv.type =... /*See below.*/

0 comments on commit 1c64b78

Please sign in to comment.