summaryrefslogtreecommitdiffstats
path: root/drivers/oled
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oled')
-rw-r--r--drivers/oled/oled_driver.c2
-rw-r--r--drivers/oled/oled_driver.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
index 9ae737ca2d..0e15c3c4b2 100644
--- a/drivers/oled/oled_driver.c
+++ b/drivers/oled/oled_driver.c
@@ -534,6 +534,8 @@ bool oled_off(void) {
return !oled_active;
}
+bool is_oled_on(void) { return oled_active; }
+
// Set the specific 8 lines rows of the screen to scroll.
// 0 is the default for start, and 7 for end, which is the entire
// height of the screen. For 128x32 screens, rows 4-7 are not used.
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
index 9a4b98d2fd..58e2bb7386 100644
--- a/drivers/oled/oled_driver.h
+++ b/drivers/oled/oled_driver.h
@@ -257,6 +257,10 @@ bool oled_on(void);
// Returns true if the screen was off or turns off
bool oled_off(void);
+// Returns true if the oled is currently on, false if it is
+// not
+bool is_oled_on(void);
+
// Basically it's oled_render, but with timeout management and oled_task_user calling!
void oled_task(void);