触摸接口
公共头文件: #include "brookesia/hal_interface/display/touch.hpp"
类名: DisplayTouchIface
API 参考
Header File
Classes
-
class DisplayTouchIface : public esp_brookesia::hal::Interface
Touch-input interface paired with a display.
Public Types
Public Functions
-
inline DisplayTouchIface(Info info)
Construct a touch-input interface.
- 参数
info – [in] Static touch capability information.
-
virtual ~DisplayTouchIface() = default
Virtual destructor for polymorphic touch interfaces.
-
virtual bool read_points(std::vector<Point> &points) = 0
Read current touch points.
- 参数
points – [out] Output touch points.
- 返回
trueon success; otherwisefalse.
-
virtual bool register_interrupt_handler(InterruptHandler handler) = 0
Register an interrupt handler.
- 参数
handler – [in] Interrupt handler. If
nullptr, the interrupt handler will be unregistered.- 返回
trueon success; otherwisefalse.
-
inline virtual bool get_driver_specific(DriverSpecific &specific)
Get the driver-specific data.
- 参数
specific – [out] The driver-specific data.
- 返回
trueon success; otherwisefalse.
Public Static Attributes
-
struct DriverSpecific
Driver-specific data.
-
struct Info
Static touch capability information.
Public Members
-
uint16_t x_max = 0
Maximum X coordinate value.
-
uint16_t y_max = 0
Maximum Y coordinate value.
-
OperationMode operation_mode = OperationMode::Max
Supported acquisition mode.
-
uint16_t x_max = 0
-
struct Point
A single touch point sample.
-
inline DisplayTouchIface(Info info)