mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
SSD1306: Added option to force reconfigure display after power off
This commit is contained in:
committed by
Xiang Xiao
parent
247a13cc02
commit
12469dd15e
@@ -416,6 +416,12 @@ config SSD1306_I2CFREQ
|
|||||||
|
|
||||||
endif # LCD_SSD1306_I2C
|
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
|
config LCD_SSD1351
|
||||||
bool "SSD1351 OLED Display Module"
|
bool "SSD1351 OLED Display Module"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -755,6 +755,13 @@ static int ssd1306_setpower(FAR struct lcd_dev_s *dev, int power)
|
|||||||
|
|
||||||
priv->on = false;
|
priv->on = false;
|
||||||
|
|
||||||
|
#ifdef CONFIG_SSD1306_POWEROFF_RECONFIGURE
|
||||||
|
|
||||||
|
/* Display is not configured anymore. */
|
||||||
|
|
||||||
|
priv->is_conf = false;
|
||||||
|
#else
|
||||||
|
|
||||||
/* Try turn off power completely */
|
/* Try turn off power completely */
|
||||||
|
|
||||||
if (priv->board_priv && priv->board_priv->set_vcc)
|
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;
|
priv->is_conf = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user