Skip to main content

I2CTouchController

platform/driver/touch/I2CTouchController.hpp

Specific I2C-enabled type of Touch Controller.

See: TouchController

Inherits from: TouchController

Public Functions

I2CTouchController(I2C & i2c)
Constructor.
virtual voidinit() =0
Initializes touch controller.
virtual boolsampleTouch(int32_t & x, int32_t & y) =0
Checks whether the touch screen is being touched, and if so, what coordinates.
virtual ~I2CTouchController()

Protected Attributes

I2C &i2c
I2C driver.

Additional inherited members

Public Functions inherited from TouchController

virtual ~TouchController()
Finalizes an instance of the TouchController class.

Public Functions Documentation

I2CTouchController

Constructor.

Initializes I2C driver.

Parameters:
i2cI2C driver.

init

virtual void init()=0

Initializes touch controller.

Reimplements: touchgfx::TouchController::init

sampleTouch

virtual bool sampleTouch(int32_t &x ,=0
int32_t &y=0
)=0

Checks whether the touch screen is being touched, and if so, what coordinates.

Parameters:
xThe x position of the touch.
yThe y position of the touch.
Returns:

True if a touch has been detected, otherwise false.

Reimplements: touchgfx::TouchController::sampleTouch

~I2CTouchController

Protected Attributes Documentation

i2c

I2C & i2c

I2C driver.