InfiniTime/src/DisplayApp/DisplayApp.h

41 lines
990 B
C
Raw Normal View History

#pragma once
#include <FreeRTOS.h>
#include <task.h>
2019-12-07 11:11:50 -05:00
#include <drivers/St7789.h>
#include <drivers/SpiMaster.h>
#include <Components/Gfx/Gfx.h>
#include <bits/unique_ptr.h>
extern const FONT_INFO lCD_70ptFontInfo;
namespace Pinetime {
namespace Applications {
class DisplayApp {
public:
void Start();
2019-12-07 11:11:50 -05:00
void Minutes(uint8_t m);
void Hours(uint8_t h);
private:
TaskHandle_t taskHandle;
static void Process(void* instance);
2019-12-07 11:11:50 -05:00
void InitHw();
Pinetime::Drivers::SpiMaster spi;
std::unique_ptr<Drivers::St7789> lcd;
std::unique_ptr<Components::Gfx> gfx;
const FONT_INFO largeFont {lCD_70ptFontInfo.height, lCD_70ptFontInfo.startChar, lCD_70ptFontInfo.endChar, lCD_70ptFontInfo.spacePixels, lCD_70ptFontInfo.charInfo, lCD_70ptFontInfo.data};
void Refresh();
uint8_t seconds = 0;
uint8_t minutes = 0;
uint8_t hours = 0;
char currentChar[4];
};
}
}