From 09c4e8ac5d4916edcaaa821392a4d12aeb6d99a3 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 25 Aug 2019 14:37:55 -0500 Subject: Added OLED Display autoscroll during periods of OLED data inactivity (#6546) * Added OLED Display autoscroll during periods of OLED data inactivity. * Fixing compile errors * Feedback from review --- drivers/oled/oled_driver.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'drivers/oled/oled_driver.h') diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 59cb4a0b2e..9c6384edce 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -138,10 +138,21 @@ along with this program. If not, see . #define OLED_FONT_HEIGHT 8 #endif -#define OLED_ROTATION_0 0x00 -#define OLED_ROTATION_90 0x01 -#define OLED_ROTATION_180 0x02 -#define OLED_ROTATION_270 0x03 +#if !defined(OLED_TIMEOUT) + #if defined(OLED_DISABLE_TIMEOUT) + #define OLED_TIMEOUT 0 + #else + #define OLED_TIMEOUT 60000 + #endif +#endif + +// OLED Rotation enum values are flags +typedef enum { + OLED_ROTATION_0 = 0, + OLED_ROTATION_90 = 1, + OLED_ROTATION_180 = 2, + OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 +} oled_rotation_t; // Initialize the oled display, rotating the rendered output based on the define passed in. // Returns true if the OLED was initialized successfully -- cgit v1.2.3