summaryrefslogtreecommitdiff
path: root/drivers/oled/oled_driver.h
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-10-29 18:12:50 +1100
committerGitHub <noreply@github.com>2020-10-29 00:12:50 -0700
commit5cecc1ea1ec8df3b74d01f96336dee2c2f5c6f4e (patch)
treec5abcb14e22e0a9ce2476162208b45bcf6a6d77a /drivers/oled/oled_driver.h
parentb9ed9d33d3b57627e919e771f62ff1cbecf0c8d4 (diff)
Add brightness level API to OLED driver (#10772)
* Add brightness level API to OLED driver * Set default brightness to 255
Diffstat (limited to 'drivers/oled/oled_driver.h')
-rw-r--r--drivers/oled/oled_driver.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
index 58e2bb7386..72ab21247d 100644
--- a/drivers/oled/oled_driver.h
+++ b/drivers/oled/oled_driver.h
@@ -141,6 +141,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#if !defined(OLED_FONT_HEIGHT)
# define OLED_FONT_HEIGHT 8
#endif
+// Default brightness level
+#if !defined(OLED_BRIGHTNESS)
+# define OLED_BRIGHTNESS 255
+#endif
#if !defined(OLED_TIMEOUT)
# if defined(OLED_DISABLE_TIMEOUT)
@@ -261,6 +265,12 @@ bool oled_off(void);
// not
bool is_oled_on(void);
+// Sets the brightness of the display
+uint8_t oled_set_brightness(uint8_t level);
+
+// Gets the current brightness of the display
+uint8_t oled_get_brightness(void);
+
// Basically it's oled_render, but with timeout management and oled_task_user calling!
void oled_task(void);