|
|
@ -25,8 +25,6 @@
|
|
|
|
#define TOUCH_START (1U << 24)
|
|
|
|
#define TOUCH_START (1U << 24)
|
|
|
|
#define TOUCH_MOVE (1U << 25)
|
|
|
|
#define TOUCH_MOVE (1U << 25)
|
|
|
|
#define TOUCH_END (1U << 26)
|
|
|
|
#define TOUCH_END (1U << 26)
|
|
|
|
#define TOUCH_CONFIRM (1U << 27)
|
|
|
|
|
|
|
|
#define TOUCH_CANCEL (1U << 28)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void touch_init(void);
|
|
|
|
void touch_init(void);
|
|
|
|
void touch_power_on(void);
|
|
|
|
void touch_power_on(void);
|
|
|
@ -34,8 +32,8 @@ void touch_power_off(void);
|
|
|
|
uint32_t touch_read(void);
|
|
|
|
uint32_t touch_read(void);
|
|
|
|
uint32_t touch_click(void);
|
|
|
|
uint32_t touch_click(void);
|
|
|
|
uint32_t touch_is_detected(void);
|
|
|
|
uint32_t touch_is_detected(void);
|
|
|
|
inline uint16_t touch_get_x(uint32_t evt) { return (evt >> 12) & 0xFFF; }
|
|
|
|
inline uint16_t touch_unpack_x(uint32_t evt) { return (evt >> 12) & 0xFFF; }
|
|
|
|
inline uint16_t touch_get_y(uint32_t evt) { return (evt >> 0) & 0xFFF; }
|
|
|
|
inline uint16_t touch_unpack_y(uint32_t evt) { return (evt >> 0) & 0xFFF; }
|
|
|
|
inline uint32_t touch_pack_xy(uint16_t x, uint16_t y) { return ((x & 0xFFF) << 12) | (y & 0xFFF); }
|
|
|
|
inline uint32_t touch_pack_xy(uint16_t x, uint16_t y) { return ((x & 0xFFF) << 12) | (y & 0xFFF); }
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|