mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
Update xdsp_09_SSD1351.ino
This commit is contained in:
parent
ed5dcbe616
commit
94ab68aed0
@ -59,23 +59,12 @@ void SSD1351_InitDriver() {
|
|||||||
fg_color = SSD1351_WHITE;
|
fg_color = SSD1351_WHITE;
|
||||||
bg_color = SSD1351_BLACK;
|
bg_color = SSD1351_BLACK;
|
||||||
|
|
||||||
|
|
||||||
#ifdef SSD1351_DC
|
|
||||||
int8_t dcpin = SSD1351_DC;
|
|
||||||
#else
|
|
||||||
int8_t dcpin = -1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (PinUsed(GPIO_SSD1351_DC)) {
|
|
||||||
dcpin = Pin(GPIO_SSD1351_DC);
|
|
||||||
}
|
|
||||||
|
|
||||||
// init renderer
|
// init renderer
|
||||||
if (TasmotaGlobal.soft_spi_enabled){
|
if (TasmotaGlobal.soft_spi_enabled){
|
||||||
ssd1351 = new SSD1351(Pin(GPIO_SSD1351_CS), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_SCLK), dcpin);
|
ssd1351 = new SSD1351(Pin(GPIO_SSD1351_CS), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_SCLK), Pin(GPIO_SSD1351_DC));
|
||||||
}
|
}
|
||||||
else if (TasmotaGlobal.spi_enabled) {
|
else if (TasmotaGlobal.spi_enabled) {
|
||||||
ssd1351 = new SSD1351(Pin(GPIO_SSD1351_CS), Pin(GPIO_SPI_MOSI), Pin(GPIO_SPI_CLK), dcpin);
|
ssd1351 = new SSD1351(Pin(GPIO_SSD1351_CS), Pin(GPIO_SPI_MOSI), Pin(GPIO_SPI_CLK), Pin(GPIO_SSD1351_DC));
|
||||||
}
|
}
|
||||||
|
|
||||||
delay(100);
|
delay(100);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user