summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorMark Roberts <mdroberts1243@gmail.com>2020-09-21 18:42:16 -0400
committerMark Roberts <mdroberts1243@gmail.com>2020-09-21 18:42:16 -0400
commitf21dc253e094854670b829f6258aac3722eefc26 (patch)
tree75a75b018c3bf6e80ffda66c74b50d681caac28a /shared-module
parent9cc803eb958baccae5d45b72c9846b011067d19c (diff)
Initial commit bool column_and_page_addressing
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/displayio/Display.c4
-rw-r--r--shared-module/displayio/Display.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c
index 021159c0d..d3e7ee175 100644
--- a/shared-module/displayio/Display.c
+++ b/shared-module/displayio/Display.c
@@ -48,7 +48,8 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
uint8_t set_row_command, uint8_t write_ram_command, uint8_t set_vertical_scroll,
uint8_t* init_sequence, uint16_t init_sequence_len, const mcu_pin_obj_t* backlight_pin,
uint16_t brightness_command, mp_float_t brightness, bool auto_brightness,
- bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second, bool backlight_on_high) {
+ bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second,
+ bool backlight_on_high), bool column_and_page_addressing {
// Turn off auto-refresh as we init.
self->auto_refresh = false;
uint16_t ram_width = 0x100;
@@ -68,6 +69,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
self->first_manual_refresh = !auto_refresh;
self->data_as_commands = data_as_commands;
self->backlight_on_high = backlight_on_high;
+ self->column_and_page_addressing = column_and_page_addressing;
self->native_frames_per_second = native_frames_per_second;
self->native_ms_per_frame = 1000 / native_frames_per_second;
diff --git a/shared-module/displayio/Display.h b/shared-module/displayio/Display.h
index bdb861aa0..86c2a9360 100644
--- a/shared-module/displayio/Display.h
+++ b/shared-module/displayio/Display.h
@@ -60,6 +60,8 @@ typedef struct {
bool auto_brightness;
bool updating_backlight;
bool backlight_on_high;
+ // new quirk for sh1107
+ bool column_and_page_addressing;
} displayio_display_obj_t;
void displayio_display_background(displayio_display_obj_t* self);