Hi,

This is perhaps more a POSIX/general programming question than NuttX but you 
are all, so often, so very helpful :)

A touchscreen peripheral (SAMA5D2 as it happens) delivers X and Y coordinates 
scaled 0-4095.

LVGL wants them scaled to the actual size of the display (800x480 in my case).

I'm not 100% sure that the chip’s TSD driver is the place to scale it?

The TSD driver creates a generic /dev/input0 character driver, which is what 
LVGL (set via Kconfig) opens. Scaling within the LVGL code isn’t right either, 
I don’t think?

I can only think of either:

1) creating a new character driver that does a translation – registered as 
/dev/input1 (or whatever) that LVGL uses, and this driver reads input0 when 
required and returns translated values.

2) Enhance the chip's TSD driver after all, using a Kconfig setting to enable 
X/Y scaling to the display's size (set in board-specific files already).

Both seem a little messy though so perhaps I’m missing something obvious? Can't 
be the first to need to do this?

Thanks,

TimH

Reply via email to