- tch:orientation(mode)
- mode = tch:orientation()
SYNOPSIS
DESCRIPTION
The touch subsystem supports transparent rotation in four basic directions. When called with a value, the function changes the assumed orientation of the touch screen. When called with no arguments, the orientation is returned without change.
The orientation value 0 indicates the native orientation of the display hardware. The values 1, 2, 3 stand for 90°, 180° and 270° in clockwise direction.
The touch screen orientation corresponds to the display framebuffer orientation. To achive a consistent system behaviour, both the framebuffer and the touch screen must be configured to the same orientation value. The framebuffer orientation is handled by gcx:orientation().
At system startup, the kernel reads the default orientation value from kconfig.value("c4s_general", "c4t_gen_display_orientation") and initializes the touch screen and framebuffer to the same value accordingly.