aboutsummaryrefslogtreecommitdiffstats
path: root/source/sharp.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2019-03-28 14:47:22 -0400
committerClyne Sullivan <tullivan99@gmail.com>2019-03-28 14:47:22 -0400
commit51a072639f2bcf95a87ccaf82c75454212fde607 (patch)
tree9a7384e46725e0f41d9f4ecdfb8eb89344ce89c5 /source/sharp.hpp
parentf986c858e54d9be72020ae2d7319e70eab6de17d (diff)
added input: scrolling and tapping
Diffstat (limited to 'source/sharp.hpp')
-rw-r--r--source/sharp.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/sharp.hpp b/source/sharp.hpp
index 2775711..3c1d34e 100644
--- a/source/sharp.hpp
+++ b/source/sharp.hpp
@@ -9,12 +9,19 @@
#define BLACK 0
#define WHITE 1
+constexpr int SHARP_WIDTH = 144;
+constexpr int SHARP_HEIGHT = 168;
+
class Sharp {
private:
static Adafruit_SharpMem display;
static TaskHandle_t taskHandle;
static std::vector<Widget *> widgets;
+
+ static int topY;
+ static int scrollVelocity;
+
public:
static void begin(void);
@@ -23,6 +30,12 @@ public:
widgets.emplace_back(new T(args...));
}
+ inline static void setScrollVelocity(int vel) {
+ scrollVelocity = vel;
+ }
+
+ static void sendInput(int ypos);
+
private:
static void updateTask(void *);
};