diff options
author | tcsullivan <tullivan99@gmail.com> | 2019-03-04 19:00:00 -0500 |
---|---|---|
committer | tcsullivan <tullivan99@gmail.com> | 2019-03-04 19:00:00 -0500 |
commit | 3c3f87b4cab153b49e3cde105dd2f34712e0b790 (patch) | |
tree | afd47ab574d832b040141050693c32c031324dda /source/driverSharp.cpp | |
parent | d2284735eee14f2210d9ee1b77b6cecb02e0589b (diff) |
lower power, sharp refresh task
Diffstat (limited to 'source/driverSharp.cpp')
-rw-r--r-- | source/driverSharp.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/driverSharp.cpp b/source/driverSharp.cpp index 74a2a70..2dbcec6 100644 --- a/source/driverSharp.cpp +++ b/source/driverSharp.cpp @@ -9,19 +9,26 @@ Adafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 144, 168); #define BLACK 0 #define WHITE 1 +static TaskHandle_t sharpHandle; +void sharpTask(void *arg); + void sharpInit(void) { display.begin(); display.clearDisplay(); - display.setTextSize(1); + display.setTextSize(3); display.setTextColor(BLACK); display.setCursor(0, 0); display.println("Hello!"); + + xTaskCreate(sharpTask, "sharp", 512, nullptr, TASK_PRIO_LOW, &sharpHandle); } -void sharpRefresh(unsigned int pause) +void sharpTask([[maybe_unused]] void *arg) { - display.refresh(); - delay(pause); + while (1) { + display.refresh(); + delay(500); + } } |