~ruther/qmk_firmware

c23667608c6ebb8f6d8a7f9b115144abd8794e00 — Fred Silberberg 5 years ago dc037f1
Add OLED driver function to determine if the screen is currently on (#10382)

3 files changed, 10 insertions(+), 0 deletions(-)

M docs/feature_oled_driver.md
M drivers/oled/oled_driver.c
M drivers/oled/oled_driver.h
M docs/feature_oled_driver.md => docs/feature_oled_driver.md +4 -0
@@ 300,6 300,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);


M drivers/oled/oled_driver.c => drivers/oled/oled_driver.c +2 -0
@@ 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.

M drivers/oled/oled_driver.h => drivers/oled/oled_driver.h +4 -0
@@ 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);