summaryrefslogtreecommitdiff
path: root/drivers/oled/oled_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oled/oled_driver.h')
-rw-r--r--drivers/oled/oled_driver.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
index 72ab21247d..a6b85f37e6 100644
--- a/drivers/oled/oled_driver.h
+++ b/drivers/oled/oled_driver.h
@@ -154,10 +154,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# endif
#endif
+#if !defined(OLED_FADE_OUT_INTERVAL)
+# define OLED_FADE_OUT_INTERVAL 0x00
+#endif
+
+#if OLED_FADE_OUT_INTERVAL > 0x0F || OLED_FADE_OUT_INTERVAL < 0x00
+# error OLED_FADE_OUT_INTERVAL must be between 0x00 and 0x0F
+#endif
+
#if !defined(OLED_I2C_TIMEOUT)
# define OLED_I2C_TIMEOUT 100
#endif
+#if !defined(OLED_UPDATE_INTERVAL) && defined(SPLIT_KEYBOARD)
+# define OLED_UPDATE_INTERVAL 50
+#endif
+
typedef struct __attribute__((__packed__)) {
uint8_t *current_element;
uint16_t remaining_element_count;
@@ -214,13 +226,17 @@ void oled_write(const char *data, bool invert);
void oled_write_ln(const char *data, bool invert);
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
+// Useful for moving the screen in preparation for new drawing
void oled_pan(bool left);
// Returns a pointer to the requested start index in the buffer plus remaining
// buffer length as struct
oled_buffer_reader_t oled_read_raw(uint16_t start_index);
+// Writes a string to the buffer at current cursor position
void oled_write_raw(const char *data, uint16_t size);
+
+// Writes a single byte into the buffer at the specified index
void oled_write_raw_byte(const char data, uint16_t index);
// Sets a specific pixel on or off
@@ -239,17 +255,11 @@ void oled_write_P(const char *data, bool invert);
// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
void oled_write_ln_P(const char *data, bool invert);
+// Writes a PROGMEM string to the buffer at current cursor position
void oled_write_raw_P(const char *data, uint16_t size);
#else
-// Writes a string to the buffer at current cursor position
-// Advances the cursor while writing, inverts the pixels if true
# define oled_write_P(data, invert) oled_write(data, invert)
-
-// Writes a string to the buffer at current cursor position
-// Advances the cursor while writing, inverts the pixels if true
-// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
# define oled_write_ln_P(data, invert) oled_write(data, invert)
-
# define oled_write_raw_P(data, size) oled_write_raw(data, size)
#endif // defined(__AVR__)