display/ssd1306: build time selection of reversed display

Resolves: #19871

Signed-off-by: Stephane D'Alu <sdalu@sdalu.com>
This commit is contained in:
Stephane D'Alu 2019-10-17 00:29:28 +02:00 committed by Maureen Helm
commit 2dad6f75f4
2 changed files with 9 additions and 0 deletions

View file

@ -35,4 +35,9 @@ config SSD1306_SH1106_COMPATIBLE
endchoice
config SSD1306_REVERSE_MODE
bool "SSD1306 reverse mode"
help
SSD16XX reverse video mode.
endif #SSD1306

View file

@ -380,7 +380,11 @@ static int ssd1306_init_device(struct device *dev)
SSD1306_CONTROL_BYTE_CMD,
SSD1306_SET_ENTIRE_DISPLAY_OFF,
SSD1306_CONTROL_LAST_BYTE_CMD,
#ifdef CONFIG_SSD1306_REVERSE_MODE
SSD1306_SET_REVERSE_DISPLAY,
#else
SSD1306_SET_NORMAL_DISPLAY,
#endif
};
#ifdef DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_CONTROLLER