idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
idfxx::lcd::touch Class Referenceabstract

Abstract base class for touch controllers. More...

Inheritance diagram for idfxx::lcd::touch:
idfxx::lcd::stmpe610

Classes

struct  config
 Configuration structure for touch controllers. More...
 

Public Types

typedef std::move_only_function< void(uint16_t *x, uint16_t *y, uint16_t *strength, uint8_t *point_num, uint8_t max_point_num)> process_coordinates_callback
 Callback type for processing touch coordinates.
 

Public Member Functions

virtual ~touch ()=default
 
 touch (const touch &)=delete
 
touchoperator= (const touch &)=delete
 
esp_lcd_touch_handle_t idf_handle () const
 Returns the underlying ESP-IDF handle.
 

Protected Member Functions

 touch ()=default
 
 touch (touch &&) noexcept=default
 
touchoperator= (touch &&) noexcept=default
 
virtual esp_lcd_touch_handle_t do_idf_handle () const =0
 Hook for idf_handle.
 

Detailed Description

Abstract base class for touch controllers.

The public interface is non-virtual; concrete drivers (e.g. idfxx::lcd::stmpe610) customize behaviour by overriding the protected do_* hooks, mirroring the standard library's non-virtual-interface pattern (cf. std::pmr::memory_resource).

Definition at line 37 of file touch.hpp.

Member Typedef Documentation

◆ process_coordinates_callback

typedef std::move_only_function< void(uint16_t* x, uint16_t* y, uint16_t* strength, uint8_t* point_num, uint8_t max_point_num)> idfxx::lcd::touch::process_coordinates_callback

Callback type for processing touch coordinates.

Definition at line 45 of file touch.hpp.

Constructor & Destructor Documentation

◆ ~touch()

virtual idfxx::lcd::touch::~touch ( )
virtualdefault

◆ touch() [1/3]

idfxx::lcd::touch::touch ( const touch )
delete

◆ touch() [2/3]

idfxx::lcd::touch::touch ( )
protecteddefault

◆ touch() [3/3]

idfxx::lcd::touch::touch ( touch &&  )
protecteddefaultnoexcept

Member Function Documentation

◆ do_idf_handle()

virtual esp_lcd_touch_handle_t idfxx::lcd::touch::do_idf_handle ( ) const
protectedpure virtual

Hook for idf_handle.

Referenced by idf_handle().

◆ idf_handle()

esp_lcd_touch_handle_t idfxx::lcd::touch::idf_handle ( ) const
inline

Returns the underlying ESP-IDF handle.

Returns
The ESP-IDF touch controller handle.

Definition at line 80 of file touch.hpp.

References do_idf_handle().

◆ operator=() [1/2]

touch & idfxx::lcd::touch::operator= ( const touch )
delete

◆ operator=() [2/2]

touch & idfxx::lcd::touch::operator= ( touch &&  )
protecteddefaultnoexcept

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