Skip to main content

Class Xpt2046

Represents an XPT2046 4-wire touch screen controller

Assembly: Xpt2046.dll
View Source
Declaration
public class Xpt2046 : ICalibratableTouchscreen, ITouchScreen

Implements:
Meadow.Hardware.ICalibratableTouchscreen, Meadow.Hardware.ITouchScreen

Properties

Rotation

Gets the current rotation of the touchscreen

View Source
Declaration
public RotationType Rotation { get; }

IsCalibrated

Returns <b>true</b> if the touchscreen has been calibrated, otherwise <b>false</b>

View Source
Declaration
public bool IsCalibrated { get; }

IsTouched

Returns <b>true</b> if the touchscreen is currently being touched, otherwise <b>false</b>

View Source
Declaration
public bool IsTouched { get; }

Methods

SetCalibrationData(IEnumerable<CalibrationPoint>)

Sets the calibration data for the touchscreen

View Source
Declaration
public void SetCalibrationData(IEnumerable<CalibrationPoint> data)
Parameters
TypeNameDescription
System.Collections.Generic.IEnumerable<Meadow.Hardware.CalibrationPoint>dataThe calibration point

Events

TouchDown

Event raised when the touchscreen is pressed

View Source
Declaration
public event TouchEventHandler? TouchDown
Event Type

Meadow.Hardware.TouchEventHandler

TouchUp

Event raised when the touchscreen is released

View Source
Declaration
public event TouchEventHandler? TouchUp
Event Type

Meadow.Hardware.TouchEventHandler

TouchClick

Event raised when a cycle of press and release has occurred

View Source
Declaration
public event TouchEventHandler? TouchClick
Event Type

Meadow.Hardware.TouchEventHandler

TouchMoved

Event raised when a cycle of press and release has occurred

View Source
Declaration
public event TouchEventHandler? TouchMoved
Event Type

Meadow.Hardware.TouchEventHandler

Implements

  • Meadow.Hardware.ICalibratableTouchscreen
  • Meadow.Hardware.ITouchScreen