1
0
Fork 0

Add brightness level API to OLED driver (#10772)

* Add brightness level API to OLED driver

* Set default brightness to 255
This commit is contained in:
Ryan 2020-10-29 18:12:50 +11:00 committed by GitHub
parent b9ed9d33d3
commit 5cecc1ea1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 3 deletions

View file

@ -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);