Added some more touch functions. Improved pixy test. Drag the Image around!

This commit is contained in:
t-moe
2015-05-02 11:58:44 +02:00
parent b491b78589
commit 3281616026
3 changed files with 81 additions and 11 deletions

View File

@@ -13,20 +13,27 @@ typedef void (*TOUCH_CALLBACK)(void* touchArea, TOUCH_ACTION triggeredAction);
typedef struct {
TOUCH_ACTION hookedActions; //Actions to listen to
unsigned int x1; //Top Left X Coordiate of Area
unsigned int y1; //Top Left Y Coordiate of Area
unsigned int x2; //Bottom Right X Coordiate of Area
unsigned int y2; //Bottom Right Y Coordiate of Area
uint16_t x1; //Top Left X Coordiate of Area
uint16_t y1; //Top Left Y Coordiate of Area
uint16_t x2; //Bottom Right X Coordiate of Area
uint16_t y2; //Bottom Right Y Coordiate of Area
TOUCH_CALLBACK callback; //Callback
uint8_t flags; //Internal Used, don't change
} TOUCH_AREA_STRUCT;
typedef struct {
uint16_t x;
uint16_t y;
} POINT_STRUCT;
bool touch_init();
bool touch_add_raw_event(uint16_t x, uint16_t y,TOUCH_STATE state);
bool touch_have_empty(unsigned char num);
bool touch_register_area(TOUCH_AREA_STRUCT* area);
void touch_unregister_area(TOUCH_AREA_STRUCT* area);
POINT_STRUCT touch_get_last_point();
#endif /* TOUCH_H */