Thanks @amirgon!
I found this post (ESP32 with Rotary Encoder - Simple example for Newbie) which is related to my question. But I’m pretty new to programming and don’t have a background in C language, by looking at the code in that post I’m a bit confused by the read_encoder function which returns a boolean - how is the turning direction and the pressing of the button data passed to the littlevgl?
Thanks,
Kaiyuan