summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayceFayne <13365789+JayceFayne@users.noreply.github.com>2021-09-05 18:09:20 +0200
committerGitHub <noreply@github.com>2021-09-05 09:09:20 -0700
commit767f2c02844acd77c86ea84fb86a1a7f49f379b0 (patch)
tree70ab6f4a9570c22f71e2a023a9497fe6eabb248a
parent0471429c018b85ebbccfe8c823621235c99458b2 (diff)
[Core] Add `is_oled_scrolling` (#14305)
-rw-r--r--docs/feature_oled_driver.md4
-rw-r--r--drivers/oled/oled_driver.h4
-rw-r--r--drivers/oled/ssd1306_sh1106.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
index c97843cfb3..49a3f0b3e3 100644
--- a/docs/feature_oled_driver.md
+++ b/docs/feature_oled_driver.md
@@ -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);
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
index fc68f0ec95..13b73ede9d 100644
--- a/drivers/oled/oled_driver.h
+++ b/drivers/oled/oled_driver.h
@@ -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);
diff --git a/drivers/oled/ssd1306_sh1106.c b/drivers/oled/ssd1306_sh1106.c
index 7d41978905..e9049438f5 100644
--- a/drivers/oled/ssd1306_sh1106.c
+++ b/drivers/oled/ssd1306_sh1106.c
@@ -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;