touch.h 601 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __TOUCH_H__
  2. #define __TOUCH_H__
  3. #include <rtthread.h>
  4. #define RT_TOUCH_NORMAL 0
  5. #define RT_TOUCH_CALIBRATION_DATA 1
  6. #define RT_TOUCH_CALIBRATION 2
  7. #define RT_TOUCH_EVENTPOST 3
  8. #define RT_TOUCH_EVENTPOST_PARAM 4
  9. struct calibration_data
  10. {
  11. rt_uint16_t min_x, max_x;
  12. rt_uint16_t min_y, max_y;
  13. };
  14. struct rt_touch_event
  15. {
  16. rt_uint16_t x;
  17. rt_uint16_t y;
  18. int pressed;
  19. };
  20. typedef void (*rt_touch_calibration_func_t)(rt_uint16_t x, rt_uint16_t y);
  21. typedef void (*rt_touch_eventpost_func_t)(void *, struct rt_touch_event *);
  22. void rtgui_touch_hw_init(void);
  23. #endif