SSD1306: Added option to force reconfigure display after power off
This commit is contained in:
parent
247a13cc02
commit
12469dd15e
|
@ -416,6 +416,12 @@ config SSD1306_I2CFREQ
|
|||
|
||||
endif # LCD_SSD1306_I2C
|
||||
|
||||
config SSD1306_POWEROFF_RECONFIGURE
|
||||
bool "Reconfigure SSD1306 after power off"
|
||||
default n
|
||||
---help---
|
||||
Forces a (re)configuration of the SSD1306 after calling power off.
|
||||
|
||||
config LCD_SSD1351
|
||||
bool "SSD1351 OLED Display Module"
|
||||
default n
|
||||
|
|
|
@ -755,6 +755,13 @@ static int ssd1306_setpower(FAR struct lcd_dev_s *dev, int power)
|
|||
|
||||
priv->on = false;
|
||||
|
||||
#ifdef CONFIG_SSD1306_POWEROFF_RECONFIGURE
|
||||
|
||||
/* Display is not configured anymore. */
|
||||
|
||||
priv->is_conf = false;
|
||||
#else
|
||||
|
||||
/* Try turn off power completely */
|
||||
|
||||
if (priv->board_priv && priv->board_priv->set_vcc)
|
||||
|
@ -768,6 +775,7 @@ static int ssd1306_setpower(FAR struct lcd_dev_s *dev, int power)
|
|||
priv->is_conf = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue