2023-11-07 00:11:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
2023-11-07 20:26:15 +00:00
|
|
|
#include <esp_timer.h>
|
|
|
|
|
2023-11-07 00:11:12 +00:00
|
|
|
#include <freertos/FreeRTOS.h>
|
|
|
|
#include <freertos/task.h>
|
|
|
|
|
2023-11-10 18:52:06 +00:00
|
|
|
#include "shared.hpp"
|
2023-11-07 00:11:12 +00:00
|
|
|
#include "lib/epd.hpp"
|
|
|
|
|
|
|
|
extern TaskHandle_t priceUpdateTaskHandle;
|
|
|
|
extern TaskHandle_t blockUpdateTaskHandle;
|
2023-11-07 20:26:15 +00:00
|
|
|
extern TaskHandle_t timeUpdateTaskHandle;
|
|
|
|
extern TaskHandle_t taskScreenRotateTaskHandle;
|
|
|
|
|
2023-11-10 22:18:14 +00:00
|
|
|
extern esp_timer_handle_t screenRotateTimer;
|
|
|
|
extern esp_timer_handle_t minuteTimer;
|
|
|
|
|
|
|
|
|
2023-11-07 20:26:15 +00:00
|
|
|
uint getCurrentScreen();
|
|
|
|
void setCurrentScreen(uint newScreen);
|
2023-11-08 11:18:59 +00:00
|
|
|
void nextScreen();
|
|
|
|
void previousScreen();
|
|
|
|
|
|
|
|
void showSystemStatusScreen();
|
2023-11-07 20:26:15 +00:00
|
|
|
|
|
|
|
void setupTimeUpdateTimer(void *pvParameters);
|
|
|
|
void setupScreenRotateTimer(void *pvParameters);
|
|
|
|
|
|
|
|
void IRAM_ATTR minuteTimerISR(void* arg);
|
|
|
|
void IRAM_ATTR screenRotateTimerISR(void* arg);
|
2023-11-07 00:11:12 +00:00
|
|
|
|
|
|
|
void taskPriceUpdate(void *pvParameters);
|
|
|
|
void taskBlockUpdate(void *pvParameters);
|
2023-11-07 20:26:15 +00:00
|
|
|
void taskTimeUpdate(void *pvParameters);
|
|
|
|
void taskScreenRotate(void *pvParameters);
|
|
|
|
|
|
|
|
uint getTimerSeconds();
|
|
|
|
bool isTimerActive();
|
|
|
|
void setTimerActive(bool status);
|
2023-11-08 11:18:59 +00:00
|
|
|
void toggleTimerActive();
|
2023-11-07 00:11:12 +00:00
|
|
|
|
2023-11-07 20:26:15 +00:00
|
|
|
void setupTasks();
|