|
@ -42,8 +42,11 @@ class XPT2046 { |
|
|
public: |
|
|
public: |
|
|
static void init(void); |
|
|
static void init(void); |
|
|
static uint8_t read_buttons(); |
|
|
static uint8_t read_buttons(); |
|
|
private: |
|
|
bool getTouchPoint(uint16_t &x, uint16_t &y); |
|
|
static bool isTouched(); |
|
|
static bool isTouched(); |
|
|
|
|
|
inline void waitForRelease(void) { while (isTouched()) { /* nada */ } } |
|
|
|
|
|
inline void waitForTouch(uint16_t &x, uint16_t &y) { while (!getTouchPoint(x, y)) { /* nada */ } } |
|
|
|
|
|
private: |
|
|
static uint16_t getInTouch(const XPTCoordinate coordinate); |
|
|
static uint16_t getInTouch(const XPTCoordinate coordinate); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|