#include <XPT2046.h>

Inheritance diagram for Graphics::XPT2046:
Collaboration diagram for Graphics::XPT2046:

Public Member Functions

 XPT2046 (HSPI::Controller &controller)
 
 XPT2046 (HSPI::Controller &controller, Graphics::Device &device)
 
 ~XPT2046 ()
 
bool begin (HSPI::PinSet pinSet, uint8_t chipSelect, uint8_t irqPin=PIN_NONE)
 
void end ()
 
Size getNativeSize () const override
 Get physical size of display. More...
 
State getState () const override
 Get current state. More...
 
void requestUpdate ()
 
- Public Member Functions inherited from Graphics::Touch
 Touch (Device *device=nullptr)
 
virtual bool setOrientation (Orientation orientation)
 Set display orientation. More...
 
virtual void setCallback (Callback callback)
 Register callback to be invoked when state changes. More...
 
Size getSize () const
 Get native dimensions for current orientation. More...
 
Orientation getOrientation ()
 Get current display orientation. More...
 
void setCalibration (const Calibration &cal)
 
Point translate (Point rawPos)
 Translate position into screen co-ordinates. More...
 

Static Public Attributes

static constexpr uint16_t sampleMax {0x0fff}
 

Additional Inherited Members

- Public Types inherited from Graphics::Touch
using Callback = Delegate< void()>
 Callback function. More...
 
- Protected Attributes inherited from Graphics::Touch
Devicedevice
 
Orientation orientation {}
 
Calibration calibration
 
Callback callback
 

Constructor & Destructor Documentation

◆ XPT2046() [1/2]

Graphics::XPT2046::XPT2046 ( HSPI::Controller controller)
inline

◆ XPT2046() [2/2]

Graphics::XPT2046::XPT2046 ( HSPI::Controller controller,
Graphics::Device device 
)
inline

◆ ~XPT2046()

Graphics::XPT2046::~XPT2046 ( )
inline

Member Function Documentation

◆ begin()

bool Graphics::XPT2046::begin ( HSPI::PinSet  pinSet,
uint8_t  chipSelect,
uint8_t  irqPin = PIN_NONE 
)

◆ end()

void Graphics::XPT2046::end ( )
inline

◆ getNativeSize()

Size Graphics::XPT2046::getNativeSize ( ) const
inlineoverridevirtual

Get physical size of display.

Return values
SizeDimensions for NORMAL orientation

Implements Graphics::Touch.

◆ getState()

State Graphics::XPT2046::getState ( ) const
inlineoverridevirtual

Get current state.

Implements Graphics::Touch.

◆ requestUpdate()

void Graphics::XPT2046::requestUpdate ( )
inline

Member Data Documentation

◆ sampleMax

constexpr uint16_t Graphics::XPT2046::sampleMax {0x0fff}
staticconstexpr

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