Huge refactoring for C++ and low-power mode
The display currently shows the time, with hours and minutes, and is capable of receiving input with buttons (though does nothing). It sleeps during intervals where nothing is happening. The display task runs once per second, and RTC alarm A is used for periodic alarms to update the system time.
This commit is contained in:
@@ -31,8 +31,6 @@ class DisplayDriver : public Common::Schedule::Task {
|
||||
public:
|
||||
DisplayDriver(Common::Schedule::TaskScheduler &scheduler, SpiDriver &spi);
|
||||
|
||||
static constexpr uint8_t DISPLAY_WIDTH = 144;
|
||||
static constexpr uint8_t DISPLAY_HEIGHT = 168;
|
||||
|
||||
|
||||
/**
|
||||
@@ -51,11 +49,22 @@ public:
|
||||
void refresh();
|
||||
void clear();
|
||||
|
||||
inline uint32_t get_width() {
|
||||
return DISPLAY_WIDTH;
|
||||
}
|
||||
|
||||
inline uint32_t get_height() {
|
||||
return DISPLAY_HEIGHT;
|
||||
}
|
||||
|
||||
private:
|
||||
void buffer_init();
|
||||
void set_dirty(unsigned int y);
|
||||
const struct glyph *glyph_for_char(const struct font *font, char c);
|
||||
|
||||
static constexpr uint32_t DISPLAY_WIDTH = 144;
|
||||
static constexpr uint32_t DISPLAY_HEIGHT = 168;
|
||||
|
||||
struct display_line
|
||||
{
|
||||
uint8_t mode;
|
||||
|
||||
Reference in New Issue
Block a user