summaryrefslogtreecommitdiff
path: root/drivers/oled/oled_driver.c
diff options
context:
space:
mode:
authorChris Salch <emeraldd.chris@gmail.com>2023-09-14 03:20:03 -0500
committerGitHub <noreply@github.com>2023-09-14 01:20:03 -0700
commitd8e100ae3cc38a63889c5933cecc13b0a58f9277 (patch)
tree5b6b5ca25fea4713695e9f1f170709a0565ecedd /drivers/oled/oled_driver.c
parentb9d6bfe927c327dbfb197bb8e9e52ac2f07d7d48 (diff)
Allow force flush of oled display (#20953)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'drivers/oled/oled_driver.c')
-rw-r--r--drivers/oled/oled_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
index 8ff6e0426c..ab04ff3d40 100644
--- a/drivers/oled/oled_driver.c
+++ b/drivers/oled/oled_driver.c
@@ -448,7 +448,7 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
}
}
-void oled_render(void) {
+void oled_render_dirty(bool all) {
// Do we have work to do?
oled_dirty &= OLED_ALL_BLOCKS_MASK;
if (!oled_dirty || !oled_initialized || oled_scrolling) {
@@ -460,7 +460,7 @@ void oled_render(void) {
uint8_t update_start = 0;
uint8_t num_processed = 0;
- while (oled_dirty && num_processed++ < OLED_UPDATE_PROCESS_LIMIT) { // render all dirty blocks (up to the configured limit)
+ while (oled_dirty && (num_processed++ < OLED_UPDATE_PROCESS_LIMIT || all)) { // render all dirty blocks (up to the configured limit)
// Find next dirty block
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
++update_start;