modm API documentation
modm::touch2046< SpiMaster, Cs > Class Template Reference

#include <modm/driver/touch/touch2046.hpp>

Inheritance diagram for modm::touch2046< SpiMaster, Cs >:
modm::SpiDevice< SpiMaster > modm::NestedResumable< 3 >

Classes

struct  Calibration
 

Public Types

enum  Orientation { Normal }
 

Public Member Functions

void setCalibration (Calibration calibration)
 
modm::ResumableResult< std::tuple< uint16_t, uint16_t, uint16_t > > getRawValues ()
 
modm::ResumableResult< bool > isTouched ()
 
modm::ResumableResult< std::tuple< uint16_t, uint16_t > > getTouchPosition ()
 
void attachConfigurationHandler (Spi::ConfigurationHandler handler)
 

Protected Member Functions

bool acquireMaster ()
 
bool releaseMaster ()
 
int8_t getResumableDepth () const
 
bool isResumableRunning () const
 
void stopResumable ()
 

Detailed Description

template<class SpiMaster, class Cs>
class modm::touch2046< SpiMaster, Cs >

Author
Raphael Lehmann

Datasheet TSC2046: https://www.ti.com/lit/ds/symlink/tsc2046.pdf

Member Function Documentation

template<class SpiMaster , class Cs >
modm::ResumableResult<std::tuple<uint16_t,uint16_t,uint16_t> > modm::touch2046< SpiMaster, Cs >::getRawValues ( )

Get raw X, Y and Z values

Returns
Position and intensity of touch point. Full int16_t range.
template<class SpiMaster , class Cs >
modm::ResumableResult<std::tuple<uint16_t,uint16_t> > modm::touch2046< SpiMaster, Cs >::getTouchPosition ( )

Get touch position

Returns
Position (X, Y) of touch point.
template<class SpiMaster , class Cs >
modm::ResumableResult<bool> modm::touch2046< SpiMaster, Cs >::isTouched ( )

Is screen touched?

Returns
bool true if screen is touched
template<class SpiMaster , class Cs >
void modm::touch2046< SpiMaster, Cs >::setCalibration ( Calibration  calibration)
inline

Set calibration data

See Calibration.


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