How to change (0,0) Top Left Corner to (0,0) Down Left Corner for the display

Hi

Touch screen on display taking values (0,0) as Down Left Corner and Display was taking (0,0) as Top Left Corner. How to change display to Down Left Corner as (0,0). I am running my project on uclinux for Cortex M7. Please do the needful.

Thank you
Mahesh

The simplest is to transform output from touchscreen, i.e. in function you’ve registered as callback for LV_INDEV_TYPE_POINTER input device, you do something like

data->point.x = touchpad_x;
data->point.y =  LV_VER_RES_MAX - touchpad_y;

JW

1 Like

Hi
Can I get the code that reads touch screen data?

Thank you
Mahesh

Hi

I need to rotate the display to -90 degrees so that the values of the touch screen will match. Is there any possibility to do that? Please help me in this.

Thank you
Mahesh

Are you trying to rotate the display to match the touchscreen, or vice versa?

Yes, I am trying to rotate the display to match the touchscreen to -90 degrees.