aboutsummaryrefslogtreecommitdiffstats
path: root/source/driverSharp.cpp
diff options
context:
space:
mode:
authortcsullivan <tullivan99@gmail.com>2019-03-01 07:32:32 -0500
committertcsullivan <tullivan99@gmail.com>2019-03-01 07:32:32 -0500
commitd2284735eee14f2210d9ee1b77b6cecb02e0589b (patch)
tree418ead20e357b8046ffb3b5586c1ac5961fbbb89 /source/driverSharp.cpp
parentd6869d1ec4bd24cd2c3eafa534f0849b25ec5607 (diff)
sharp screen working
Diffstat (limited to 'source/driverSharp.cpp')
-rw-r--r--source/driverSharp.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/driverSharp.cpp b/source/driverSharp.cpp
new file mode 100644
index 0000000..74a2a70
--- /dev/null
+++ b/source/driverSharp.cpp
@@ -0,0 +1,27 @@
+#include "sharp/Adafruit_SharpMem.h"
+
+#define SHARP_SCK 12
+#define SHARP_MOSI 13
+#define SHARP_SS 6
+
+Adafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 144, 168);
+
+#define BLACK 0
+#define WHITE 1
+
+void sharpInit(void)
+{
+ display.begin();
+ display.clearDisplay();
+ display.setTextSize(1);
+ display.setTextColor(BLACK);
+ display.setCursor(0, 0);
+ display.println("Hello!");
+}
+
+void sharpRefresh(unsigned int pause)
+{
+ display.refresh();
+ delay(pause);
+}
+