Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <class T, class U> class Pair{
- public:
- T a;
- U b;
- Pair(){
- a = T();
- b = U();
- };
- Pair(T aa, U bb){
- a = aa;
- b = bb;
- };
- };
- class touch{
- public:
- uint16_t x;
- uint16_t y;
- touch(){};
- void ReadCoordinates(void);
- Pair<uint16_t, uint16_t> ReadKey(void);
- void wait_release_key(void);
- };
- Pair<uint16_t, uint16_t> touch::ReadKey(void)
- {
- Touch.ReadCoordinates();
- wait_release_key();
- return Pair<uint16_t, uint16_t>(this->x, this->y);
- }
Advertisement
Add Comment
Please, Sign In to add comment