Add OLED driver function to determine if the screen is currently on (#10382)

This commit is contained in:
Fred Silberberg 2020-09-21 18:39:50 -07:00 committed by GitHub
parent dc037f1391
commit c23667608c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -300,6 +300,10 @@ bool oled_on(void);
// Returns true if the screen was off or turns off // Returns true if the screen was off or turns off
bool oled_off(void); 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! // Basically it's oled_render, but with timeout management and oled_task_user calling!
void oled_task(void); void oled_task(void);

View File

@ -534,6 +534,8 @@ bool oled_off(void) {
return !oled_active; return !oled_active;
} }
bool is_oled_on(void) { return oled_active; }
// Set the specific 8 lines rows of the screen to scroll. // 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 // 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. // height of the screen. For 128x32 screens, rows 4-7 are not used.

View File

@ -257,6 +257,10 @@ bool oled_on(void);
// Returns true if the screen was off or turns off // Returns true if the screen was off or turns off
bool oled_off(void); 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! // Basically it's oled_render, but with timeout management and oled_task_user calling!
void oled_task(void); void oled_task(void);