6 #ifndef _ADAFRUIT_TOUCHSCREEN_H_ 7 #define _ADAFRUIT_TOUCHSCREEN_H_ 10 #if (defined(__AVR_ATmega328P__) || defined(__AVR_ATmega32U4__) || \ 11 defined(TEENSYDUINO) || defined(__AVR_ATmega2560__) || \ 12 defined(__AVR_ATmega4809__)) && \ 13 !defined(__IMXRT1062__) 14 typedef volatile uint8_t RwReg;
15 #elif defined(ARDUINO_STM32_FEATHER) 16 typedef volatile uint32 RwReg;
17 #elif defined(NRF52_SERIES) || defined(ESP32) || defined(ESP8266) || \ 18 defined(ARDUINO_ARCH_STM32) || defined(__IMXRT1062__) 19 typedef volatile uint32_t RwReg;
21 typedef volatile uint32_t RwReg;
24 #if defined(__AVR__) || defined(TEENSYDUINO) || defined(ARDUINO_ARCH_SAMD) 25 #define USE_FAST_PINIO 56 TouchScreen(uint8_t xp, uint8_t yp, uint8_t xm, uint8_t ym, uint16_t rx);
63 bool isTouching(
void);
64 uint16_t pressure(
void);
71 uint8_t _yp, _ym, _xm, _xp;
74 #if defined(USE_FAST_PINIO) 75 volatile RwReg *xp_port, *yp_port, *xm_port, *ym_port;
76 RwReg xp_pin, xm_pin, yp_pin, ym_pin;
bool operator==(TSPoint)
Check if the current point is equivalent to another point.
Definition: TouchScreen.cpp:44
Definition: TouchScreen.h:44
int16_t y
state variable for the y value
Definition: TouchScreen.h:38
Definition: TouchScreen.h:30
int16_t z
state variable for the z value
Definition: TouchScreen.h:38
int16_t pressureThreshhold
Pressure threshold for isTouching
Definition: TouchScreen.h:68
int16_t x
state variable for the x value
Definition: TouchScreen.h:38
bool operator!=(TSPoint)
Check if the current point is not equivalent to another point.
Definition: TouchScreen.cpp:55