Skip to content

Commit

Permalink
fix ssd1306 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
profezzorn committed Jul 26, 2023
1 parent b6b7561 commit f5f15d3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions display/ssd1306.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class Display : public MonoFrame<Width, col_t> {
virtual void Page() = 0;
virtual void SB_Top() = 0;
virtual Screen GetScreen() = 0;
virtual void SB_IsOn(bool* on) = 0;
};

template<int Width, class col_t>
Expand Down Expand Up @@ -628,10 +629,8 @@ class StandardDisplayController : public DisplayControllerBase<Width, col_t>, Sa
}
}

// TODO: Don't update the display when we don't need to
// and return false here so that we can go into lower power modes.
void SB_IsOn(bool* on) override {
*on = on_;
display_->SB_IsOn(on);
}

void SetScreenNow(Screen screen) {
Expand Down Expand Up @@ -984,6 +983,11 @@ class SSD1306Template : public Display<WIDTH, col_t>, I2CDevice, Looper, StateMa
return controller_->GetScreen();
}

// TODO: Don't update the display when we don't need to
// and return false here so that we can go into lower power modes.
void SB_IsOn(bool* on) override {
*on = on_;
}

void Loop() override {
#ifdef USB_CLASS_MSC
Expand Down

0 comments on commit f5f15d3

Please sign in to comment.