Skip to content

Commit

Permalink
[Core] Add is_oled_scrolling (qmk#14305)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayceFayne committed Sep 5, 2021
1 parent baa6de2 commit bb65502
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/feature_oled_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ bool oled_scroll_left(void);
// Returns true if the screen was not scrolling or stops scrolling
bool oled_scroll_off(void);

// Returns true if the oled is currently scrolling, false if it is
// not
bool is_oled_scrolling(void);

// Inverts the display
// Returns true if the screen was or is inverted
bool oled_invert(bool invert);
Expand Down
4 changes: 4 additions & 0 deletions drivers/oled/oled_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ bool oled_scroll_left(void);
// Returns true if the screen was not scrolling or stops scrolling
bool oled_scroll_off(void);

// Returns true if the oled is currently scrolling, false if it is
// not
bool is_oled_scrolling(void);

// Inverts the display
// Returns true if the screen was or is inverted
bool oled_invert(bool invert);
Expand Down
2 changes: 2 additions & 0 deletions drivers/oled/ssd1306_sh1106.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@ bool oled_scroll_off(void) {
return !oled_scrolling;
}

bool is_oled_scrolling(void) { return oled_scrolling; }

bool oled_invert(bool invert) {
if (!oled_initialized) {
return oled_inverted;
Expand Down

0 comments on commit bb65502

Please sign in to comment.