roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
roo_display::TouchDevice Class Referenceabstract

Touch controller interface. More...

#include <device.h>

Inheritance diagram for roo_display::TouchDevice:
[legend]

Public Member Functions

virtual ~TouchDevice ()=default
 
virtual void initTouch ()
 Initialize the touch controller.
 
virtual TouchResult getTouch (TouchPoint *points, int max_points)=0
 Read the current touch state.
 

Detailed Description

Touch controller interface.

Definition at line 428 of file device.h.

Constructor & Destructor Documentation

◆ ~TouchDevice()

virtual roo_display::TouchDevice::~TouchDevice ( )
virtualdefault

Member Function Documentation

◆ getTouch()

virtual TouchResult roo_display::TouchDevice::getTouch ( TouchPoint points,
int  max_points 
)
pure virtual

Read the current touch state.

If no touch is registered, returns {.touch_points = 0} and does not modify points. If $k$ touch points are registered, writes min(k, max_points) entries to points, and returns {.touch_points = k}. In both cases, the returned timestamp is the detection time.

Parameters
pointsOutput buffer for touch points.
max_pointsCapacity of points.
Returns
Touch result metadata.

Implemented in roo_display::DummyTouch, roo_display::BasicTouchDevice< max_touch_points >, roo_display::BasicTouchDevice< 1 >, roo_display::BasicTouchDevice< 2 >, and roo_display::BasicTouchDevice< 5 >.

Referenced by roo_display::TouchDisplay::getRawTouch().

◆ initTouch()

virtual void roo_display::TouchDevice::initTouch ( )
inlinevirtual

The documentation for this class was generated from the following file: