Skip to content

Instantly share code, notes, and snippets.

@mzyy94
Last active January 14, 2022 19:08
Show Gist options
  • Save mzyy94/63115e9d0b3f0e0a4803713d8d7ac6e2 to your computer and use it in GitHub Desktop.
Save mzyy94/63115e9d0b3f0e0a4803713d8d7ac6e2 to your computer and use it in GitHub Desktop.
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "inkplate.hpp"
Inkplate display(DisplayMode::INKPLATE_3BIT);
void main_task(void *)
{
display.begin();
display.clearDisplay();
display.drawImage("/sdcard/grad.bmp", 0, 0, false, false);
display.display();
for (;;)
{
vTaskDelay(1000000 / portTICK_PERIOD_MS);
}
}
extern "C"
{
void app_main()
{
xTaskCreatePinnedToCore(main_task, "main_task", 8192, nullptr, 1, nullptr, 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment